Milk of kosher animals (such as cow, sheep, or goat) is kosher. To ensure that the milk in your cup comes from only kosher animals, Jewish law requires that a mashgiach (Jewish supervisor) be present for the duration of the milking process. Where supervised milk is unavailable, some rabbinic authorities permit government inspection as sufficient assurance (although not in all countries). In common parlance, this is known as chalav stam. All agree, however, that actual supervision is preferable. Milk with such supervision is known as chalav Yisrael.
Even when chalav Yisrael is very difficult to obtain, many people go out of their way to acquire these products. Certainly, where they are readily available, one is required to use this milk.
Note: according to Jewish law, milk and meat must be kept separate and are prepared and served on separate sets of pots and dishes.

What exactly does a mashgiach do on a dairy farm besides seeing to it that only cows and goats are used for milk?
They have to oversee the koshering of the pipes and vats before the milking process begins.
They have to ensure that the Kosher run gets loaded into the Kosher milk truck and seal it.
Ideally, he should also ensure the cows are in good health before getting milked. But this, is a more delicate process and I don't know how the Kosher Authorities handle this.