Mountains are formed through a process called tectonic activity. This occurs when tectonic plates beneath the Earth's surface shift and collide. When two plates collide, one may be forced underneath the other in a process called subduction. This can cause the Earth's crust to fold and buckle, leading to the formation of mountain ranges. Additionally, volcanic activity can also play a role in the formation of mountains as magma rises to the surface and solidifies, building up over time to create volcanic mountain ranges.