Answer:
The minerals are formed on earth by the natural processes, such as from the process of evaporation, crystallization of magma and that are crystallized directly from sea water. The formation of minerals depends upon the type of minerals and elements that are present in that area. The temperature and pressure plays an important role in forming these minerals.
The water is mostly comprised of various types of dissolved substances. As the water gets evaporate, the minerals are precipitated. For example, Gypsum and Halite are formed by this process.
The hot sea water often flows through the interconnected pores, dissolving minerals under the earth's crust. This water when cools, the dissolved minerals gets separated from the water and again forms solid. For example, gold is formed by this process, which dissolves in the hot water that flows through the crust. As the water starts cooling, it again forms solid.
The minerals are also formed when magma above or under the earth's surface undergoes crystallization and solidification, resulting in the formation of extrusive and intrusive igneous rocks respectively. These minerals are combined with one another forming rocks. For example, granite, basalt, lava.