The dairy heats the milk to either 125 degrees F for at least 30 minutes or, more often, to 161 degrees F for at least 15 seconds. Either temperature-time combination kills pathogenic bacteria in the milk. Pasteurization (as well as homogenization) also makes milk more digestible.
Pasteurization accomplishes another mission. Whether or not milk is pasteurized, it will eventually spoil when nonpathogenic bacteria multiply sufficiently. The heat treatment stalls this inevitable process by significantly reducing the original number of nonpathogenic bacteria in the milk.
Contrary to statements by the dairy industry, pasteurization does give milk a slight cooked flavor. However, this flavor short-coming is noticeable only to educated palates and is more than compensated for by the fact that pasteurized milk is, on balance, much safer to drink than raw (unpasteurized) milk, a potential source of diseases, among them tuberculosis. If you do drink raw milk, be certain that the product came to you from a reliable dairy, distributor, and merchant. If your source is a healthy pet cow in the pasture within view of your window, all the better.