Dental cavities and tooth decay are primarily caused by the bacterium Streptococcus mutans. When exposed to sugars in the diet, the bacterium produces acids that erode tooth enamel. Proper oral hygiene, regular dental visits, and limiting sugary foods are key to preventing cavities caused by Streptococcus mutans.