This happens when two plates move towards each other and collide, resulting in the formation of mountains or ocean trenches.