They are called fossil fuels because they are believed to have been created from the decaying remnants of ancient lifeforms. There are some scientists who dispute this claim, however.
Fossil fuels are a limited resource, but the alarmist reports from the early 1970s (the [oil crisis]?) that the supplies should run out about now have proven wrong. Still, sooner or later we will have to find alternatives in some kind of renewable energy source.
When generating electricity fossil fuels are almost always used to produce steam which then drives a generator? that produces electricity.