Rocks look tough and hard, but that is because we see them at the Earth's surface when they are cold. Many rocks, however, are deep underground, and then they are under great pressure. This makes them hot and in this condition they can go like plastic. Under some conditions, sheets of rock can be squashed together when they are like plastic, and this makes them fold up.
If we see rocks like this at the surface, we know they must have been folded deep under the surface. This normally happens under mountains, so the rock in this picture was once under a mountain.