Flatulence, otherwise known as a fart, can range from mildly fragrant to nothing but nasty. The defining difference is how much hydrogen sulfide enters the gassy mix.
Some foods — like beans, eggs, cabbage, soda, and cheese — are rich in sulfur. The more sulfur you pass through your digestive system, the more awful smelling air biscuits you can expect in the end.
The wind you break contains several other gases that aren't real stinkers: nitrogen, carbon dioxide, and flammable oxygen and methane. Production of this bodily exhaust takes place in your large intestine, where enzymes gobble up undigested nutrients. The resulting gas then seeks an exit route, and the closest escape produces the sound and scent sensation.
Humans aren't the only creatures who cut the cheese. Dogs, cats, cows, turtles, birds, elephants, horses, snakes, even termites pass gas. Although people fart the most when they're relaxed and sleeping, a healthy man or women typically averages around 15 warm winds a day.