You are talking about and have drawn a picture of fractional distillation. Distillation is a purification process commonly used to separate and purify liquids. There are two basic types of distillation, simple and fractional. Simple distillations are for purifying simple compounds and involves an empty column shaft. Fractional distillation is used to separate more complex mixtures and involves the column being packed with a packing material. The purpose of this material is to increase the surface area of the distillation column, thus increasing the number of theoretical plates in the column. Basically, the higher the number of theoretical plates, the better the separation will be. This is because the more surface area there is in the column, the more that the chemical vapors will re-condense back into liquid form. Each time that the liquid condenses and re-vaporizes, the more concentrated the vapors become in the lower boiling chemical, thus increasing the separation power of the column.
Crude oil is a highly complex mixture of hydrocarbons, ranging from one carbon (methane) to over seventy carbons. In general, the lower molecular weight the hydrocarbon is, the lower its boiling point will be and vice versa. Petrol (gasoline) is on the lower molecular weight end of the hydrocarbon scale, so petrol hydrocarbons will have fairly low boiling points compared to most of the hydrocarbons in crude oil. So in a large fractional distillation column like the one you have drawn, the trays you have drawn inside the column act to increase the number of theoretical plates to separate the different chemical species. Petrol will be amongst the earliest hydrocarbons to emerge from the top of the column into the condenser. Once the petrol is isolated and collected, the temperature of the furnace at the bottom of the column is increased to allow the next highest boiling point hydrocarbons (naphtha) to emerge from the top of the column. This process is continued to collect all of the separated hydrocarbons from crude oil.
Through the process of oil refining do you get petroil from crude oil. Crude oil is a mixture of various hydrocarbons and can be physically separated by a distilling process. Fractional distillation is the use of heat to separate mixtures. In the case of crude oil the hydrocarbons at the bottom of the fractional column have higher boiling points than hydrocarbons at the top. Petrol is a relatively small hydrocarbon and had a lower boiling point and is found higher in the fractional column. Larger hydrocarbons like Fuel Oil have a high boiling pint and are at the bottom of the column.