In physics, a rock is a naturally occurring solid aggregate of one or more minerals or mineraloids. Rocks are classified into three main types: igneous, sedimentary, and metamorphic, based on their origin and formation processes.
Igneous rocks are formed from the solidification and cooling of molten rock material (magma or lava). The cooling process can occur either beneath the Earth's surface (intrusive) or on the surface (extrusive). Examples of igneous rocks include granite, basalt, and obsidian.
Sedimentary rocks are formed from the accumulation and lithification of sediments, which may consist of pieces of other rocks, minerals, or organic materials. The processes of compaction and cementation transform loose sediments into solid rock. Examples of sedimentary rocks include limestone, sandstone, and shale.
Metamorphic rocks are formed from the alteration of pre-existing rocks due to high temperature, pressure, or chemical processes, without melting. This transformation often occurs deep within the Earth's crust. Examples of metamorphic rocks include marble, slate, and schist.