To prevent cavities, encourage your child to brush their teeth twice a day for two minutes each time, floss daily, follow a healthy diet low in sugary foods and drinks, and visit the dentist regularly. Dental sealants can also be applied to the molars to provide an extra layer of protection against cavities.