When you swallow air, there are also gases like nitrogen and oxygen in the air. As food is broken down in the intestines, other gases are made like carbon dioxide, methane, and hydrogen. All of these gases, along with hydrogen sulfide and ammonia, combine to make up a fart.