Farting is a natural bodily function that occurs when gas builds up in the digestive system. This gas can come from a variety of sources, including swallowed air, the breakdown of undigested food by bacteria in the colon, and the fermentation of certain foods in the intestines. Farting helps to release this excess gas from the body and is a normal and healthy part of digestion.