!!! Disclaimer: Lactation is pretty new, not well researched and more complex the usual. Some info may be false, misleading or missing, so take the info here with a grain salt. !!!
A player, with breasts that are able to produce milk, is able to start lactating. There are several possible causes.
Milk production comes in three steps: "Producing small amounts of milk" -> "Producing a moderate amount of milk" -> "Producing a staggering amount of milk".
Shrinking ones breasts will weaken and finally remove the effect (this won't remove hucow).
The Lactation spell causes breasts to produce milk. Continued exposure to the spell will increase milk production and a critical hit will cause a rapid spike in milk production. This spell has no effect on people without breasts or who are otherwise unable to develop milk glands.
The spell can be learned after being infected with the Hucow virus for quite some time (the exact time is unknown for now, but bring some patience). (It's possible that it can also be learned from the plain Lactation effect. Further research is needed.)
Eating a cookie will increase your lactation.
When exploring the gym you have the chance of a special encounter with a girl running into you. This will get you infected with the Hucow-virus. If you have contact to an infected player, there's also a chance to catch the disease.
For the virus to show effect, you have to be female and have breasts. (You can get infected as male, too, but it's only affecting you once you turn female.) The incubation time is 2-3 in-game days. Once you fulfill the requirements, the Hucow effect will be visible as part of your breasts traits. Your milk production will increase over time, causing your breasts to grow with it and you'll become eligible to infect other people.