Here's why:
* Igneous and sedimentary are indeed two main types of rocks.
* Magma is the molten rock found beneath the Earth's surface. It's the source material for igneous rocks.
The third main type of rock is metamorphic. Metamorphic rocks are formed when existing igneous or sedimentary rocks are transformed by heat and pressure.