How does petroleum provide power to communities?

Simple Answer:

Petroleum is burned to boil water into steam. That steam rises and turns the electrical generator.