Teeth are made up of complex interconnected minerals. The enamel is made up mostly of fluoride, calcium, magnesium and trace amounts of nitrogen. These elements are bonded together, but these bonds can be broken, and the minerals can be leached out of the teeth. Usually it is one of two things that do this; food or bacteria.