Porters and Stouts were similar but different... in the beginning. I'm going to try my best to paraphrase this wonderful article, some of the BJCP Guidelines, and this article.
Porters (have #s) Stouts (have bullet points)
- A substantial, malty dark ale with a complex and flavorful roasty character.
- A very dark, roasty, bitter, creamy ale.
These are the BJCP definitions - note... they're fairly similar
- Originally, just your "common" brown beer.
- Originally, just a "stout" (or stronger) brown beer.
Already... you can probably see why people use them interchangeably
- Origin for Porters are credited to London.
- Stouts are credited with originating in Ireland.
Apparently, water (which, as odd as it seems, is the most unique thing to beers!) and science played a large part in London's success in creating Porters instead of porter being a generic brown beer. Science revealed that the efficiency of the brown grains was 2/3 of pale malt. Even though brown malt was cheaper than pale, the horrible grain efficiency made it more expensive. Therefore the Porter soon had a mixed grain bill using a brown malt base and substituted pale malt for profit. This was made even more apparent when the English Government/Parliament/forgive my idiocy on the verbage here started taxing beer.
Later- London started using a method known as "parti-gyling"... per the first link:
Parti-gyling isn’t what you think it is. Almost all modern descriptions get it badly wrong. It isn’t—after 1800 at least—using the first runnings to make one beer and the second and third for others. It’s much more sophisticated than that.
Porter brewers mashed several times. The worts from each mash were hopped and boiled separately, then blended to produce whatever beers were required. Two, three or even four beers were assembled from blends of each of the worts.
It’s a very efficient way of making not just huge volumes of a beer, but also relatively small amounts of stronger beers. Or any amount of any strength beer. With their brew lengths of hundreds of barrels, London’s porter brewers couldn’t brew the strongest Stouts single-gyle. The amount they could sell would barely have covered the false bottoms of their massive mash tuns.
That’s why they often parti-gyled their stouts with porter. You can probably see where this is going. The recipes for porter and stout were, by definition, identical, as they were brewed together.
(Sorry I couldn't paraphrase this part... it all seemed relevant.)
So... it seems that all Stouts are Porters; but, not all Porters are Stouts (think squares and rectangles).
As far as Schwarzbier goes - this is a LAGER where Porters and Stouts are ALES. I also differentiate between ales and lagers in this post. In the homebrewing world, there was a fad of black-lagers/ales a few years ago. The grain used in brewing was more or less burnt in order to give the pale ale a dark appearance but taste/feel like a pale ale/lager.
Dark beer is just a classification of all of these types.
Here is a link to the Beer Judge Certification Program (BJCP) that has links to what each beer type should taste/look like.