Answer:
Typically by burning them. Burning may take place in a jet turbine (for natural gas) or in a steam generator. The steam may be used for heating or industrial processes, or used to turn another type of turbine, which turns an electric generator.
Of course, the gasoline, kerosene and diesel fuel burned by vehicles is also a form of fossil fuel.