Rapids occur where rivers flow quickly over rocks that have sloping ledges.
Water will flow very fast in any river which is flowing steeply downslope. Usually it will sweep away all the sand and other materials that normally settle on the river bed. Instead, the rock will be exposed. So 'white-water', which is when the water makes foam, as in the picture above, does not necessarily tell of rapids, they just tell of very fast-moving water. Rapids are, however, common places of white water.
When you get rocks with many layers, and these rocks stand up in the river bed, the weaker rocks will get worn away faster than the stronger ones. So some bands will stand up a little higher in the river bed. If the layers tilt downriver, this will produce a number of mini-waterfalls. That is what rapids are. Some people would call this a cascade.