Milk straight from the cow is called raw milk. It has a very short shelf life because of the presence of bacteria. If you pasteurize it, you can store it a few days longer. If you sterilize the milk, you increase its shelf life even further but this does alter the flavor slightly. With pasteurization, the milk is heated briefly to a little over 70 °C and with sterilization the heat process lasts longer and the temperature is also higher. The heat treatment in both pasteurization and sterilization ensures that any nasty bacteria are removed from the raw milk before packaging. So both treatments guarantee product food safety.