What is the difference between pasteurised, UHT and raw milk?
The difference is how much heat the milk has been through, and that determines both safety and how long it keeps.
Raw milk is unheated, straight from the animal after filtering and chilling. It retains whatever microorganisms were present, which is the point for its advocates and the objection for public health bodies. Raw milk can carry Salmonella, E. coli O157, Campylobacter and Listeria, and outbreaks are documented regularly. It is banned or heavily restricted for retail sale in many countries and jurisdictions. Health authorities generally advise against it entirely for children, pregnant women, older people and anyone immunocompromised. Claims that it retains significantly more nutrients are not well supported — pasteurisation causes only modest losses, mostly of some B and C vitamins that milk is not a major source of anyway.
Pasteurised milk is heated enough to destroy pathogens without sterilising. The common method, HTST (high temperature short time), heats to around 72°C for 15 seconds. This kills the organisms that cause disease and most that cause spoilage, giving a fridge life of one to two weeks. Flavour is close to raw. This is standard supermarket milk.
UHT (ultra-high temperature) heats to around 135–150°C for a few seconds, then packages it aseptically. This is effectively sterilising, so unopened cartons keep for months at ambient temperature — which is why UHT dominates in hot climates and countries with long distribution chains.
Why UHT tastes different. The high heat drives Maillard reactions and denatures whey proteins, producing a faintly cooked or caramelised note and a slightly different mouthfeel. Once opened it must be refrigerated and behaves like ordinary milk.
ESL (extended shelf life) sits between the two.
Homogenisation is separate — it breaks up fat globules so cream does not rise, and has nothing to do with heat treatment.