How the rocks are formed?

Igneous rocks are formed when melted rock cools and solidifies. Melted rock may come in the form of magma, when it is found underneath the Earth's surface. It can also come in the form of lava, when it is released unto the Earth's surface during a volcanic eruption.

Keeping this in consideration, how the 3 types of rocks are formed?

The three main types, or classes, of rock are sedimentary, metamorphic, and igneous and the differences among them have to do with how they are formed. Sedimentary rocks are formed from particles of sand, shells, pebbles, and other fragments of material. Together, all these particles are called sediment.

How are rocks formed in nature?

Sedimentary rocks are formed through the gradual accumulation of sediments: for example, sand on a beach or mud on a river bed. Metamorphic rocks are rocks which once existed as igneous or sedimentary rocks but have been subjected to varying degrees of pressure and heat within the Earth's crust.

What causes a rock to undergo metamorphism?

Metamorphism occurs because rocks undergo changes in temperature and pressure and may be subjected to differential stress and hydrothermal fluids. Thus higher temperature can occur by burial of rock. Temperature can also increase due to igneous intrusion.