The material that we call rock goes through cycles, being melted, weathered, eroded, buried and eventually heated and compressed until it melts again.
Rocks are mostly made of minerals or their weathering products, which were, at one stage of their existence, crystalline, and may still be crystalline.
Rocks erode and re-form in the rock cycle. The process involves chemical and mechanical weathering, erosion, transport, deposition and compaction
Rocks and soil erode. Water transports sediments downstream, and the sediment particle size in a stream depends on the speed of the water flow.
Sedimentary rocks which are buried under a sufficient load of more recent sediment may be compressed and heated so that over time they form metamorphic rocks.
Metamorphic and sedimentary rocks may be melted to form magma that later becomes an igneous rock, but usually they are metamorphosed long before they melt.
The properties of rocks are determined by the minerals in them, and the minerals in rocks often reveal their origins, even the depths at which they formed.
Most minerals in rocks are present as crystals: the size of the crystals in igneous rocks shows how quickly they cooled, with slow cooling giving big crystals.
The hardness of minerals can be used to distinguish them by finding what they can and cannot scratch, and what will scratch them, using Mohs' scale of hardness.
Rocks that cooled slowly at first may contain phenocrysts, because when the cooling speeds up, the phenocrysts may be surrounded by smaller crystals.
Rocks weather chemically, with minerals changing chemically, often to soluble material which leaches away, resistant particles like quartz, and clay minerals.