Mammary glands, the source of milk, are unique to mammals, as is milk itself, though pigeons produce something similar in their crops for their young. Mammary glands are what give our class of animals their name. We are the mammals or the mammary gland possessing animals.
Mammary glands are modified sweat glands and are not the same as the mamillae (nipples or teats) through which most young mammals obtain the milk secreted by the mammary glands. Though all mammals have mammary glands and produce milk, not all mammals have teats. The exceptions are the two monotremes the Echidna and the Platypus.
Milk doesn't just leak out whenever, it generally requires a chemical and physical stimulus. The chemical stimulus to release milk is the hormone oxytocin produced in the pituitary gland. The production of milk in the glands is stimulated by the lactogenic hormone also produced in the pituitary gland at the time of parturition (the act of giving birth). The physical release is normally the act of suckling. Sometimes kneading of the area containing the mammary glands is also required and you will often see young mammals (cats, dogs, sheep, pigs, cattle, etc) appearing to head butt their mothers while sucking on the nipple. Milk also contains antibacterial and antifungal agents.
The amount of protein in a mother's milk controls how fast her young grow. While a young horse takes 60 days to double its weight after birth a baby Harp seal doubles its weight in only 5 days after birth.