The Earth's crust may seem hard and solid, but it is actually always on the move. Wherever you may be on the earth, the rocks on which you are standing are probably moving by several centimetres a year.
Great slabs of the Earth's surface move in different directions. When slabs (which scientists call plates) move towards one another the rocks at the colliding edges crumple into folds. Most mountain ranges have been formed this way, which is why they are called Fold Mountains.
This diagram shows a range of mountains with sharp peaks. But if you were to look at it from the side, you would find that the rocks make folding patterns.