In the simplest terms, we get energy from coal by burning it. For a very long time, human beings mined coal and used it at their homes to generate heat energy for cooking food and keeping themselves warm. Coal is a fossil fuel and when burned releases energy. Stoves of various designs were used for centuries to accomplish the above mentioned purposes. Then industrial revolution happened couple of centuries ago and we started using coal for industrial applications, such as lifting weight, melting metal, running engines, etc. The biggest development was use of coal for generating electricity. In a thermal power plant based on coal, the fuel is burned to generate heat, which converts water to steam. This superheated steam is used to generate electricity. Thermal power plants are the major source of electricity around the world. The use of coal for heating and cooking is now limited to underdeveloped countries and some parts of developing countries.
Hope this helps.