About half a million years ago, human beings learned to make fire. By collecting and burning wood they were able to warm themselves, cook food and manufacture primitive implements. All these activities utilize various forms of energy - biological, chemical, solar, nuclear and hydraulic.
Energy, 'the ability to do work' utilizing the forces of nature or the composition of dead organic material, is essential for meeting basic human needs, extending life expectancy, and providing an acceptable living standard.
Energy can be of several forms: thermal, chemical, electrical, radiant, nuclear, etc. In general terms these forms can be grouped as potential and kinetic energies. No one can create or destroy energy. As per the law of conservation we can only convert the energy from one form to another using devices just like the battery to convert chemical energy in to electricity.
Earth receives most of its energy from the Sun. Sun has lot of energy generated due to the nuclear fusion that happens at its core.