Mastitis is an inflammation of the mammary gland, associated with a bacterial infection. It is caused by pathogenic microorganisms that enter the udder through the teat canal. Mammary tissue is then damaged, which causes increased vascular permeability. As a result of this, milk composition changes.

There are two types of mastitis, more specific clinical mastitis and subclinical mastitis.

Clinical mastitis is an inflammatory response to infection causing visibly abnormal milk (eg. color, fibrin clots). As the extent of the inflammation increases, changes in the udder (swelling, heat, pain, redness) may also appear.

Subclinical mastitis is the type of mastitis without any visible signs of infection. Subclinical mastitis is the most prevalent form of mastitis. Detection of subclinical mastitis is best done by examination of milk for somatic cell counts using either the California Mastitis Test or automated methods. Somatic cell counts are positively correlated with the presence of infection. Cows with a somatic cell count of ≥280,000 cells/ml have more than 80% chance of being infected. Likewise, the higher the somatic cell count in a herd bulk tank, the higher the prevalence of infection the herd.