Molten magma cools down and forms volcanic rock types.