Bettas, also called Siamese fighting fish, can tolerate less-than-ideal aquarium conditions, but to thrive, they need certain water quality and plenty of space. Though bettas can survive in a small, room-temperature bowl, they're going to fare better in a real, heated aquarium. In cramped, unhealthy conditions, bettas succumb to various diseases, including several types of fungus.
Almost all types of fungal disease -- and bacterial diseases that get lumped in with them -- are opportunistic infections. This means the organisms that cause these illnesses live in most aquarium water and even in fishes' bodies. These organisms cause disease only when something else goes wrong. When a betta is kept in unhealthy conditions, it is more prone to developing opportunistic fungal infections. You can limit risk of such infection by keeping a betta in a real aquarium with light current.
Mouth fungus most usually starts -- as the name indicates -- on a fish's mouth. However, it can also occur on the head and gills. The infection is actually caused by bacteria (genus Flexibacter), but these bacteria form white, gray or pinkish colonies that look fuzzy like a fungus. To treat it, you need to use an antibiotic that can treat gram-negative bacterial infections like kanamycin. You can purchase such antibiotics at pet shops; many will indicate they are effective against mouth fungus. Ideally, you should put your betta in a separate quarantine aquarium for treatment, since antibiotics can kill the beneficial bacteria that break down fish waste in aquariums.
Body fungus -- despite the name -- can infect the gills of a betta. The fungi that cause it belong to the related genera Saprolegnia and Achyla. This true fungal infection typically looks like whitish cottony growths. The strands may pick up colors from debris, giving them other colors. You can treat this infection with antifugal drugs, available from pet shops, or by adding 1 teaspoon of rock salt per gallon of aquarium water. This fungal infection rarely spreads between fish, so you should treat your betta in quarantine to avoid harming other fish with the increased salt levels or antifungals, both of which may harm other fish.
Branchiomycosis or gill fungus is less common than other fungi that may attack the gill. While it is a true fungus, it often occurs with bacteria -- and purely bacterial infections look identical. In this infection, your betta will flap his gill covers more quickly. You will see blotchy red and white patches on the gills themselves if your betta has this type of fungus. You should immediately treat with a broad-spectrum antibiotic. Many pet shop antibiotics contain cocktails of drugs that can treat both bacteria and fungi. Unlike other fungus forms, this one spreads to other fish rapidly, and you should treat the entire aquarium. While this is the "true" gill fungus, you are more likely to see a body or mouth fungus infect the gills of a betta than this fungus.