Swim Bladder Disorder (SBD)
SBD is a very common ailment to betta fish and is typically a result of overfeeding. The SBD and treatment that I describe is assumed to be caused by overfeeding. A betta's swim bladder is an organ that allows the fish to float right-side up and gives the fish control over its buoyancy (see image below).
The text in the image is hard to read, but the swim bladder is the large blue organ that runs along the side of the betta. When a betta's digestive track gets blocked up (due to constipation), the stomach swells, causing the swim bladder to be pushed slightly out of place. Fish with swim bladder disorder appear to be floating on their sides and may have trouble keeping themselves at the bottom of a bowl.
As mentioned in the Food section, bettas are prone to constipation, and for this reason, it aids general digestion to fast your fish once a week.
Many times the culprit of constipation is the feeding of pellets. Bettas need some variation in their diets and are carnivores, so pellets allow aquarists to feed "meat" to their fish in a compact form. Consider that the size of a betta's stomach is about the size of its eye which is about the size of a pellet, and you may understand that a couple pellets could overwhelm a betta's digestive system, especially with the observation that pellets expand in water.
SBD is typically pretty simple to treat considering that it is a disorder and not a disease or parasite. It is not contagious to other fish. The key to treatment of SBD is relieving your betta of constipation, and so the first step to take (after a water change; I'll explain this momentarily) is to fast your fish for three-four days. Sometimes this alone will cure the problem; fasting might allow the digestive track time to process the excess food and purge it. And for those of you who fear starvation of your betta if it's not fed for three or four days, rest assured that bettas can survive a good two weeks without any food at all. During this three or four day period, keep a lookout in what should be a clean bowl for feces. A betta with SBD will have trouble having a bowel movement, so any sign of this is very welcome in this situation! The water change's purpose was to avoid the possible aid of poor water quality to the problem but also so that you could try to spot feces in the bowl.
After the fasting period, many people use the often-successful "pea treatment" as a tiny betta laxative of sorts. Take a single cooked pea and shell it (not as hard/tedious as it sounds...try pinching it off). Then, using a toothpick, mash the pea up into betta-sized pieces. To get your betta to eat plant material (since they're carnivores) can be hard. Stimulate your betta's feeding instincts by running the toothpick on the surface of the water. When you have your betta close, scoop up a small amount of pea and try to get your betta to eat it. Beware that the pea will probably sink quickly, unlike pellets, so you may want to avoid having any stones in the bottom of the bowl for this stage so your betta can get to the food even if it falls. Give your betta a few little scoopfuls of the pea, but don't go overboard--uneaten pea will rot at the bottom of the bowl and contribute to bad water conditions. Within the next few days you will probably notice feces in the bottom of the bowl, which is quite an accomplishment in treatment of SBD!
Continue the fasting/pea treatment pattern for a few more days, which cleans out your betta's digestive track. At points your betta will appear not to be on his/her side anymore but may revert back to that at points too.
When the SBD appears to be gone for several days, you should feed food that is not low in moisture content, so don't feed pellets for a while. You may try bloodworms--they are a pretty natural food for bettas.