Minerals form in many ways. The mineral halite, which is used as table salt, forms when water evaporates in a hot, shallow part of the ocean, leaving behind the salt it contained. Many types of minerals are made when molten rock, or magma cools and turns into a solid. Talc, a mineral that can be used to make baby powder, forms deep in Earth as high pressure and temperature causes changes in solid rock.