Underground, metamorphic rocks melt into lava due to extreme heat. So when a Volcano erupts, as you know the magma flows out of the volcano. Once the magma, or in other words lava cools down it becomes igneous rock.
That's show metamorphic rock becomes igneous rock.
I hope this helps! :)
-LizzyIsTheQueen