The primary mechanism by which toothpaste prevents tooth decay is through the action of fluoride. Fluoride incorporated into toothpaste strengthens tooth enamel by promoting the formation of fluorapatite, a crystalline structure more resistant to acid dissolution than hydroxyapatite, the main component of enamel.