Teeth are weakened by acid. This acid is produced by the bacteria in our mouths or it could be from the foods and drinks we consume. The acid dissolves the minerals out of the outer layer of our teeth, the enamel. By exposing our teeth to fluoride we can put the minerals back in.
Let’s go a little further into to chemistry. Enamel is made with a very hard substance call hydroxyapatite. Acids have extra positive hydrogen ions (H+). They attract the negative hydroxyl ions (OH-) out of the hydroxyapatite. Fluoride is a very large negative ion (F-), the fluoride can soak into the spaces where the hydroxyl (OH-) ions came out and complete the structure. This new structure is called Fluorapatite and because the fluoride is a stronger negative ion in actually stronger than the original hydroxyapatite.
This back and forth process happens on our tooth surface continually it is exposed to acids and fluoride. We usually refer to this a as demineralization/remineralization cycle.