As magma cools it becomes igneous rock.