The vapours condense as they rise up the tower. The heavier ones (with higher boiling points) condense first. The thinner, runny ones get further up the tower before they condense. And the gases pass out of the top.
The distillation tower (or still) splits the crude oil into its separate fractions.
This is how it works. The hot mixture is pumped into the bottom. The tower acts as a heat exchanger, removing heat from the vapours as they rise. Some of them condense back into liquids and fall back down the column.
So the temperature gradually decreases as you go up the column. Different groups of hydrocarbons condense at different heights. The heaviest at the bottom, the lightest at he top.