Earlier, the windmills were used to harness wind energy to do mechanical work such as lifting/drawing water from a well. Today, windmills are used to generate electricity. In windmills, the kinetic energy of wind is harnessed and converted into electricity.
Hydro energy which was used for transportation before is now a good source to generate electricity. Dams have been constructed on the river for generating electricity. Waterfalls were used as a source of potential energy which was converted to electricity with the help of turbines.