A waterfall is created due to the banding of rocks with varying hardness and softness. The harder rock (granite) is more resistant to erosion and so erodes at a different speed to the soft (sandstone). This is called differential erosion.
Processes of erosion such as hydraulic action (where the sheer force of the water dislodges rocks from the bank and bed of the river) and corrasion (the wearing away of the river's bank and bed by the load hitting against them) cause the softer bands of rock to erode more quickly beginning the formation of an overhang.
When the water flows over the overhang it has a lot of energy and causes undercutting of the soft rock underneath. A plunge pool is formed. Where water is swirled around in the plunge pool potholing can occur. Debris will be swept into the pool and rub the bed and bank (corrosion) deepening it further.
Without support, the overhang eventually becomes unstable and collapses. Over time the waterfall is seen to move upstream (retreat).