The resources most commonly considered “nonrenewable” are oil, natural gas, coal, and uranium. Fossil fuels (oil/petroleum, natural gas/propane, coal) can take millions of years to form, and at current rates will be depleted long before any more will form. Uranium is not a fossil fuel, but the special kind used in nuclear plants is very rare.
See the difference between Nonrenewable and Renewable Resources
Power plants which run off of nonrenewable resources use the nonrenewable resource to generate heat. The heat is used to boil water, which turns a turbine, and the turbine generates electricity.
Fossil fuels were formed from organic material which was deposited on the bottom of the ocean floor a long time ago, millions of years before the dinosaurs. This organic material became part of the sedimentary rock, and as more layers were added and the pressure on top built high enough to create intense heat these organic materials went through chemical changes, becoming different sorts of carbon based solids, liquids, and gases.