Very good, you are along the right tract. The breast is, in fact, a modified pilosebaceous unit. A pilosebaceous unit is the combination of a hair forming unit (pilo is greek for hair) and sebaceous gland (the tiny gland that secretes lipid and proteins and is the origin for zits). Each pilosebaceous unit has two tiny smooth muscle units that are supposed to assist in the erection of the hair shaft.

Lactation, which is under the control of the peptide hormone prolactin, and to a much lesser extent the large peptide hormone growth hormone has two phases. One is a secretory phase where the secretory cells of the breast make the proteins (lactalbumin and caseins) and fats of milk. The milk is kept in the mammary glandular units because the smooth muscles in the mammary ducts is contracted, holding the milk in. When proper stimulus is applied (e.g. suckling), the smooth muscles relax and the milk (in essence bottled under pressure) can flow out.

All of this, which we still only incompletely understand, is accomplished totally without comprehension by nursing female mammals from a modified hair follicle. Fortuantely, mammary physiologists (who are mostly interested in matters bovine), O.B.s and dermatologists seldom talk with each other. For if we had to rely on scientific understanding to advise mothers on how to nurse everyone would be bottle fed.