Folding or bucking of the earth's crust generally happens when two plates collide or move towards each other. The collision causes the edges of the plates to be raised or uplifted to form mountains. Most fold mountains thus occur at margins of plates.