How does petroleum occur in nature?

It doesn't occur in nature. It occurs as a long chain hydrocarbon, such as crude oil. Crude oil is then split up into different fractions in a fractioning column (via distillation). One of the shorter chains that has practical uses is petrol.
Fractions include: Fuel oil, Diesel, lubricating oil, kerosene, jet fuels, petroleum and bottled gas.