Igneous- if formed from melted rock (magma or lava) by crystallization or solidification. Can be found near molten ground.
Sedimentary- if rock is subjected to weathering and erosion. They can exist in stratification but mostly in chunks or mounds above ground.
Metamorphic- if the rock is subjected to high heat and high pressure. They usually exist in stratified layers.
There are two types of igneous rocks, intrusive (formed below ground) and extrusive (formed immediately after an eruption or lava leak)