Almost nobody wants crude oil. What people want is gasoline, diesel, jet fuel, marine fuel and petrochemical feedstock, and crude is the raw material those are made from. That single fact drives most of the demand side of the market: a refiner buys crude only when the products it can make are worth more than the crude plus the cost of processing.
A refinery separates crude by boiling point and then upgrades the heavy fractions into lighter, more valuable ones. The separation is distillation and is common to every refinery. The upgrading is where refineries differ enormously: a simple refinery does little of it and needs light sweet crude, while a complex one with cokers and hydrocrackers can take heavy sour crude and still produce a light product slate. That difference in configuration is why quality differentials exist at all.
The economics reduce to a margin, and the market's tradeable proxy for that margin is the crack spread. When cracks are strong, refiners run hard and bid for crude; when cracks collapse, they cut runs and crude demand falls with them. This is the main transmission channel from product demand back into the crude market, and it operates on a timescale of weeks rather than instants.
Two features of the system generate most of its interesting behaviour. Refinery output is a joint product, so you cannot make more diesel without making more of everything else in some proportion, which means a shortage of one product tends to create a surplus of another. And refining capacity is lumpy and slow: a unit is offline or online, maintenance happens in seasonal waves, and new capacity arrives in large discrete steps years after it is commissioned.