Milk is an extremely nutritious liquid food. It not only restores thirst, but also some hunger.
It is obtained from either sheep or cows. To do so, select [#]Extended commands -> [F]ill, and choose the animal in question. It will fill the selected container with milk, so the container used affects the amount you get from each milking. A skin gives you 5 lbs of milk, a tub gives 8 lbs, a bag 12 lbs, etc.
Milk is excellent for nursing emaciated characters out of starvation, as it is extremely nutritious per pound and is relatively easy to obtain, and unlike food can be consumed after the hunger bar is completely empty. Note: Milk is currently considered an Exploit, as one can purchase two animals and survive indefinitely since animals do not need to feed.
Because milk can only be gathered once per day, it is best to have multiple containers available so as not to top off a container directly from the animal. Instead, a container should be completely filled by pouring extra milk from another partially filled container into it. This way, a milking is not wasted by filling the last 0.01 lbs of capacity in a container from the animal due to the semi random amount of milk gotten.
Animals can only be milked once a day, but during winter they have dry period and can not be milked. (Confirmed as of 3.19(maybe earlier)).