Waterfalls form where there is a layer of hard rock on top of a layer of soft rock.
The soft rock is eroded more quickly and undercuts the hard rock creating a ledge. The overhanging ledge is unsupported and eventually collapses into the plunge pool below.
These rock fragments increase the rate of erosion and the process repeats. Overtime, the waterfall retreats upstream, forming a steep-sided gorge.