A "fart in Spanish" is called a pedo. This term is informal and widely used in everyday conversation.
The word pedo comes from Latin peditum, meaning "a breaking wind." It's the most common way to refer to flatulence in Spanish-speaking countries. While it's casual, it's not vulgar like the English equivalent.
There are a few variations depending on context:
For a more polite term, use ventosidad, which is formal and medical. However, this is rarely used in daily conversation.
Many learners confuse pedo with pito, which means "whistle" or is a vulgar term for male genitalia. Another mistake is using gas, which refers to gas in general, not specifically flatulence.
In Spanish culture, farting is often seen as humorous rather than offensive. For example, the phrase ¡Qué pedo! can mean "What a fart!" but is also used to express surprise or disbelief, similar to saying "What the heck!" in English.
I once heard a Spanish friend use pedo in a conversation about weather changes, saying El calor me da muchos pedos ("The heat gives me many farts"). It was a lighthearted way to describe how hot weather affects digestion.