Cavities are small holes in teeth that appear as a result of tooth decay. You can prevent cavities by brushing your teeth at least two times daily, flossing every day and avoiding foods or drinks that are high in sugar. In addition, regular trips to your dentist can help prevent tooth decay which will, in turn, prevent the onset of cavities.