that is a general question!
sour, could be a variety of wild yeasts and/or bacteria., brett, aceto
sulfur is often just from the yeast you are choosing to use but can also be caused by a variety of other organisms. lager type yeasts tend to produce a lot of sulfur during fermentation but usually clean up after themselves.
the vomit/death smell some others have been talking about is from a couple of different kinds of bacteria.
certain soil bacteria can give beer a really wild, garden soil smell, just like if you picked up a hadful of dirt and stuck your nose in it.
funky, barnyardy, leathery, pungent smells can be from brett or pedio.