What Is Geology?
Geology is the science comprising the study of solid Earth, the rocks of which it is composed, and the processes by which they change.

How are Sedimentary, Igneous, Metamorphic Rocks Formed?

SEDIMENTARY ROCK –  A river carries, or transports, pieces of broken rock as it flows along. When the river reaches a lake or the sea, its load of transported rocks settles to the bottom. We say that the rocks are deposited. The deposited rocks build up in layers, called sediments. This process is called sedimentation.

The weight of the sediments on top squashes the sediments at the bottom. This is called compaction. The water is squeezed out from between the pieces of rock and crystals of different salts form.
The crystals form a sort of glue that sticks or cements the pieces of rock together. This process is called cementation.
These processes eventually make a type of rock called sedimentary rock. It may take millions of years for sedimentary rocks to form.
These are the different processes in order:
sedimentation → compaction → cementation

IGNEOUS ROCK – The inside of the Earth is very hot – hot enough to melt rocks. Molten (liquid) rock forms when rocks melt. The molten rock is called magma. When the magma cools and solidifies, a type of rock called igneous rock forms.
METAMORPHIC ROCK  – Earth movements can cause rocks to be deeply buried or squeezed. As a result, the rocks are heated and put under great pressure. They do not melt, but the minerals they contain are changed chemically, forming metamorphic rocks.
Sometimes, metamorphic rocks are formed when rocks are close to some molten magma, and so get heated up.

What does a Geologist Do?