Petroleum is basically the fossil fuel. Hydrocarbon C and H are the components that make up different types of fuel example oil, gas and coal. Well the generation of hydrocarbon type is given by a specific type of Kerogen.
Kerogen is the organic matter that are deposited, it can be made up of different types. Example micro-organism, sea plants, land plants etc.
Different type of Kerogen produces different type of hydrocarbon
Type I Kerogen
This type of Kerogen comprises organic matter of microorganisms which is mostly from sea, they settle down at the bottom of the sea when they die and deposit. These type gives mostly oil and less gas.
Type II Kerogen
This comprises mostly of the sea plants and less animal so they care to generate oil and gas but mostly gas and less oil.
Type III Kerogen
This has the terrestial (land) plants and as you know coal is formed by the remains of plants so type 3 gives coal and less oil and gas comparative higher proportion.
Type IV Kerogen
This type of kerogen is oxidized and in order for the hydrocarbon generation the organic matter should not be oxidized or they will not produce the fuel. So the type 4 give inert gases as organic matter is oxidized and produce less gas, not economical.