Fossil fuels are energy sources, such as coal and petroleum, obtained from underneath the Earth's crust. They are directly available to human beings for use. Hence, fossil fuels are the direct source of energy. These are limited in amount. These are non-renewable sources of energy because these cannot be replenished in nature. Fossil fuels take millions of years for their formation. If the present fossil fuel of the Earth gets exhausted, its formation will take several years. Fossil fuels are also very costly.
On the other hand, solar energy is a renewable and direct source of energy. The Sun has been shining for several years and will do so for the next five billion years. Solar energy is available free of cost to all in unlimited amount. It replenishes in the Sun itself.