In 1924, the United States Public Health Service (USPHS) developed a model law called the Pasteurized Milk Ordinance (PMO) to stop milk-borne illness. The intent of the law was to require that only Grade "A" pasteurized milk could be sold to consumers and businesses. So far, all but four states have passed the law or a modified version of it.
Small milk producers have gone around the law by selling shares in their animals, and some state regulators have chosen not to intervene. The share plan, which has been adopted by some people with cows, is like the community supported agriculture (CSA) model, in which people invest in (buy a share of) a farm and get vegetables and fruits throughout the season — only in this case, they get milk.Even if you can't sell milk for human consumption, you may be able to sell it to people for their pigs, dogs, or orphaned animals. In every state but Michigan, goat owners can legally sell raw milk for animal consumption.
Legally selling milk products such as yogurt or cheese without being licensed as a dairy is another story. Most states prohibit sales of these items by small, unlicensed farmers, although in some states the authorities' policy is not to actively seek out people who are selling these products outside of the law.
If you plan to sell your milk or milk products on a small scale, first find out what hoops you need to jump through. This Farm-to-Consumer Legal Defense Fund page contains state-by-state information on raw milk laws.