As far as I know, "porter" is the dark beer style that was popular in the 18th century especially with dock workers in London. "Stout" is actually short for "stout porter" i.e., strong porter, which has a higher alcohol content.
What is the difference nowdays? I don't think there really is one, it just depends on who you ask. Some people like to add oats and bulk up their stouts or make them into extra stouts or strong stouts. In modern terms, stouts are sometimes higher in ABV than porters, even though it used to be the other way around.
The best stout-porter I've ever had was Black Pearl Porter, you can find the recipe on this forum. WOW... when the weather cools down again, you can bet I'm going to brew a sankey's worth!