Lava is your answer.
Lava is molten rock that is spewed from a volcano when in eruption. Once cooled and hardened (usually through long periods of time or with contact to large bodies of water), the lava would harden and mix with other materials, allowing it to form into igneous rocks.
hope this helps