Heat is defined as the flow of energy from hotter to cooler objects.
There are many sources of heat. Some of them are,
  1. Sun
  2. Chemical (Combustion)
  3. Electrical
  4. Friction
Sun is the major and an essential source of heat and light energy on earth. We know that the sun is a hot ball of fire. Due to nuclear fusion, heat is produced from helium, which is present in the sun.
Source of heat - Sun

How does this heat reach earth?
The heat freed from the sun's chemical reactions does not stay near the sun but instead spreads away from it and into space. Even though the earth is situated millions of miles away from the sun, a portion of this energy reaches the earth in the form of light.
Energy from the sun reaches the earth in the form of light
Energy from the sun reaches the earth
After standing under the sunlight for some time, touch your head.
Does it feel warm?
Man stands under the sunlight
Yes, it feels warm because the sun gives out heat besides light.
Combustion is a chemical process that produces heat energy. In this process, a substance (fuel) reacts with an oxidizer (a source of oxygen), resulting in exhaust and heat energy.
Combustion process
Heat energy is produced by burning fuels like wood, kerosene, coal, charcoal, gasoline/petrol, oil, etc.,
Burning fuels
The Flow of electrons through a substance is called an electrical current. The substance which allows the flow of current is called a conductor.
Electrical energy by using battery
Examples of conductors and insulators
No conductors fully allow the flow of current, and all resist electron flow to some extent. When the electron flow is opposed, some of the electrons energy can't travel all the way. Because energy is conserved, the energy that was moving the electrons forward is converted to heat energy.
Electric circuit
Water heaters, iron boxes, electric kettles, etc., work on this principle.
Electric kettle
Iron box
When two surfaces are in contact, they move related to each other; the friction between them transforms kinetic energy into thermal energy (that is, it converts work to heat).
Heat energy due friction