Rocks that form when magma or lava cools are called