We divide rocks into three basic types: igneous, formed when molten rocks cool down; sedimentary, formed when sediment is deposited at the bottom of the sea; and metamorphic, made when other kinds of rock are transformed by heat and pressure.
As you probably know, the inside of the Earth is very hot, and rocks deep inside melt in the high temperatures. Molten rock is called magma. When it erupts to the surface, for example in a volcano, we call it lava. When molten rock solidifies, it becomes igneous rock such as granite, made out of interlocking crystals. If the rocks cool slowly, as they sometimes do deep within the Earth's crust, these crystals are large, because they have a lot of time to grow. If they cool quickly, like lava does when it hits the cold air or sea water, there is little time for the crystals to grow, so they are very small. Igneous rocks tend to be very hard.
Sedimentary rocks are formed from grains, deposited on the sea bed in layers, and compacted by the pressure of the sea. The grains might come from other rocks that have been eroded by the sea or the weather, or they might be hard, left-over bits of long-dead organisms. Chalk is mostly made of the shells of microscopic organisms called coccolithophores, for example. It is quite common to find fossils of larger animals deposited in sedimentary rocks such as limestone. Because they are made of little bits of things, only loosely pressed together, sedimentary rocks tend to be far weaker than other kinds of rock, and they are very susceptible to erosion.
Metamorphic rocks are formed when other kinds of rock are transfomed (metamorphosed) by heat and pressure within the Earth's crust – enough to bring about profound changes in their chemistry and structure, but not enough to melt them. The presence of water and the effects of strain are also important here. Because there are so many different factors deciding the final form of the rock, metamorphic rocks are incredibly varied. They are usually hard, having been subjected to great heat and pressure, and often stripy or banded due to shear forces causing them to change shape as they formed.