How do coal plants work?
They burn the coal as fuel to boil water to produce high-pressure steam which is then used to turn turbines that drive electrical generators to make electricity.
In practice, remember that all fuel sources of energy are thermal, and the conversion to electrical power uses the same mechanisms, and therefore similar efficiencies. All generate thermal energy – although by different processes – that is used to generate steam, which is used to generate electricity through expansion turbines and generators.
Every power generation technology has its own unique advantages and disadvantages. There are reasons that we use all of them. Improvements can also be made in the overall efficiency (lifecycle) of all of them, and we should be very reluctant to discard any of them entirely, or to rely on any one of them excessively.
A good animation from TVA is here: