Igneous rocks are formed when magma is cooled and hardened. There are two types of Igneous rocks which is based on where the magma cools and hardens.
Intrusive rocks are igneous rocks that is formed deep within the earth. (from magma) e.g.(granite)
Extrusive rocks are igneous rocks that is formed at the . (from lava) e.g.(rhyolite)http://www.mineralogy4kids.org/rock-cycle/extrusive-igneous-rocks