Petrolium is a collective term for fossil hydrocarbons. But I assume here that you mean petrol or gasoline as it is sometimes marketed as just petrolium. Hydrocarbons can have different lengths of the carbon chains in them. When we pump it out from the ground it is a mixture of both short and long chains. But a refinery can separate these and also chemically alter one into the other. Shorter hydrocarbon chains are lighter, they flow easier and combust easier. Longer hydrocarbon chains are heavier, flow much slower, lubricates better and is harder to combust. The lightest hydrocarbons are gasses like methane, propane, butane, etc. The heaviest is tar which for all practical purposes is a solid.
Petrol are lighter then diesel. It is easier to ignite petrol, you can for example ignite it with a match which is hard to do with diesel. And diesel can be used as a light lubricant which is done in diesel engines to lubricate the fuel pump and injectors. These fuels are used for different types of engines. A petrol engine use the Otto cycle which mixes air and fuel well before making it detonate with a spark. This is hard to do with diesel, a lot of sources will say it is impossible. So a Diesel cycle engine compress the air much higher to generate enough pressure and heat for diesel to self ignite. And then inject diesel into the cylinder under these conditions. This creates a very different combustion, it takes longer, the fuel is not well mixed with the air, and the pressures involved are much higher. The advantage is that diesel is much more energy dense meaning that a liter of diesel have more energy then a liter of petrol.
Latest Answers