Crystallization
Crystallization is a process that forms a repeated pattern and gives mineral and molecule chains strength. A crystal starts forming, and converts the matter around it into an extension of itself. Crystal formation creates a solid material from something that was once fluid. A common example is water freezing. The water turns to snowflakes or ice, which both rely on a repeated crystal structure for their shape and strength. Crystallization occurs slowly, since the crystal builds itself off of a single starting point. If a liquid is forced to become a solid too quickly, crystals cannot form.
Igneous Rocks
Igneous rocks are formed from lava, magma that has erupted or seeped out to the surface of the earth. As the magma cools, crystals form, chaining together to make rock. An exception is when the lava is cooled quickly in any water surrounding the eruption, like an ocean. This cools the magma too quickly for crystallization to occur and instead creates obsidian, a glass.
Examples of igneous rocks include basalt, granite, rhyolite and diorite. Basalt, rhyolite and their relative andesite all cooled comparatively quickly, and their crystal grains are smaller, giving the rock a finer texture with few or no visible crystals. Granite's distinctive grainy texture is from visible crystals that formed.
Metamorphic Rocks
Metamorphic rocks are rocks that began as one type, and changed over time. Deposits of rocks like limestone or slate become compressed over time, and recrystallize from the pressure. They were never completely liquid like lava-based rocks, but rather formed crystals slowly as the solid state changed.
Examples of metamorphic rocks that are crystals include feldspar, marble and quartz. Quartz varieties especially reform into the familiar crystal shape, like the chunks inside of a geode. Marble's often sparkling look is from visible crystals.
Evaporites
Water and other liquids can leave behind crystals. These crystals form sedimentary rocks called evaporites when they are left or accumulate into large deposits. Examples of evaporites are gypsum and rock salt (halite). The chunks of salt used in driveways in winter, as well as in fine dining and animal husbandry, come from pulverized rock salt.