My dad is a dairy farmer in Ontario Canada. I was officially farming with him until my chauvinist Grandfather got tired of me being in the barn and trying to suggest anything he hadn't thought of (should mention that he's physically unable to do most barn chores due to his age and health, so if it wasn't for my dad, he wouldn't be farming now at all).
We milk Holstein cows, the big, black and white spotted kind.
Dairy farmers try to get their cows to milk for 305 days a year. An individual cow can't be milked year round, because she needs to be 'dry' before she has another calf.
A cow's pregnancy lasts for nine months.
When a heifer (female) calf is born, she is fed milk for 3-6 months, depending on the farm. People used to think that more milk was better, but now we tend to agree that 3 months is long enough. The calf is also fed grain and hay as soon as she will eat it.
If she is of a sufficient size (this depends on the breed of cow) at the age of 15 months, she'll be bred. If not, she'll wait until she is big enough. Farmers usually like their heifers to calve when they're about 24 months of age.
After calving, she will ideally milk for 305 days (give or take), then she will be 'dried off' because she will be pregnant again, and will be given about eight weeks off.
After the eight weeks, she'll calve again and be back in business.
Henceforth, one cow won't milk all year, but depending on when she calved, she might milk in the winter.
Since people expect milk on the table year round, farmers have to milk cows year round. Because they have multiple cows (we for instance have 41 milking cows and are a very small farm), this is easy to do because the cows calve at different times so the majority of the herd is always milking.
Oh, and a cow's length of milking is called a 'lactation'.