As magma cools, crystals grow, forming an igneous rock. The crystals grow larger if the magma cools slowly, as it does if it remains deep within the Earth. If the magma cools quickly, the crystals will be very small. When crystals form from magma it is called crystallization. Common sedimentary rocks include sandstone, limestone, and shale. These rocks often start as sediments carried in rivers and deposited in lakes and oceans. When buried, the sediments lose water and become cemented to form rock.