At its simplest, it is a contractual relationship between homeowners in a neighborhood. Typically it is only “pseudo-voluntary”, what I mean is, there are special legal attachments that can be associated with property called “covenants.”
In practice what tends to happen is this. A real estate developer buys a large piece of land, that they envision turning into a “community”, neighborhood, whatever you want to call it. These communities take many different forms, some are geared towards ultra high-income individuals and will be gated with armed security and key card entrance, exclusive resort style facilities shared by all community members and etc. Some are just your standard middle class neighborhoods that were basically built by the same developer/home builder as part of a planned development.
When the developer puts their business plan into motion, something they will do is have all of the lots in the development attached with one of those covenants I mentioned above. Those covenants are basically a type of restriction on what an owner can do with their property, specifically as regards a HOA, the covenant basically says “this property is attached to xxx Home Owner’s Association, anyone buying this property must continue their relationship with xxx Home Owner’s Association and may not sever the lot from the HOA.” That’s where it is “pseudo-voluntary”, basically if you buy property with a covenant on it that associates it with a HOA, you’re now a member of that HOA. If you do not wish to be part of a HOA, your only option is to buy property elsewhere. Once you’ve bought, there is not typically any way to sever your property from the HOA*.
Typically the covenant will say stuff like “HOA will have control over x, x, and x. Changes to the HOA bylaws must be enacted by a vote of property owners etc etc etc.” HOAs do not operate outside the realm of the law, as is sometimes felt by some people, but they can generally regulate a neighborhood far more than a municipal or county government could. For example they can put restrictions on the decorations you put on your house, signage you have in your yard etc, in ways that a government entity would probably not be able to do because of First Amendment concerns. (It isn’t generally a first amendment issue with a HOA, because it’s a voluntary contractual agreement between homeowners, and specific regulations are allowed in the HOA bylaws, and there is usually a voting procedure listed in the bylaws for changing regulations or adding new ones.)
So why have a HOA? I’m in real estate myself (but not in the segment of the industry that deals with residential developments where HOAs are commonly found), and from my contacts in the industry I can say that at least around here (I live in Virginia, where this happened) HOAs are extremely common with any new neighborhood development. This is because HOAs can offer the following benefits:
Regulation on upkeep of the neighborhood. In many areas, you can literally park a rusted car in your front lawn and leave it for 20 years and the county/municipal governments will not say a word. You can paint your house neon green etc. Many people feel that if a neighborhood has controls on the appearance of the property, it keeps property values consistent, and minimizes the ability of one “odd ball” from lowering property values in the neighborhood.
Privately contracted street maintenance / upkeep. Many HOA communities take care of road paving and snow plowing themselves. This is beneficial in many areas because often times local government has a prioritization scheme in place and many residential side streets will not get plowed until late in the process.
Community resources. In many cities, there isn’t really an easy mechanism in place for a single neighborhood to get say, a park or a pool etc that it might want. In a HOA, that stuff can be created on the communal land areas and maintained for the enjoyment of the residents. If you just live in a regular neighborhood in a municipality or county, you basically have to go to the town council / county commission and lobby for a park or a pool opened in your neighborhood. Maybe it will happen, maybe it won’t. And then anytime the parks and recreation department is low on funding, there is a risk your park or pool gets closed down.
That’s some of the benefits, and people have tended to “buy into” these benefits because they perceive HOA neighborhoods to execute on a lot of those promises. However, HOAs have many downsides as well. Like condo boards (organizations of condominium residents that manage the condo building) they are infamous for being ran by little Napoleon types. Most people who live in a HOA want nothing to do with HOA business, they’re fine paying their HOA fee and reaping the benefits, but they don’t want to run the HOA. HOAs are run by an elected board typically, but most homeowners do not go to the HOA board meetings to elect board members and don’t even go for the community wide votes. So only the most interested residents are involved in running the HOA, this often ends up being Napoleon complex type people that like to promulgate petty rules. That’s basically what happened in this situation.
But that’s not how all HOAs are ran. I know of some HOAs where literally the only thing the HOA does is collect money for the road maintenance/plowing fund. That’s it. They don’t promulgate rules, they don’t go around to see if property is kept in a certain level of cleanliness or etc. There are many different kinds of HOAs, some of the ones that are particularly minimal in their function, there may be homeowners living there that do not even know they live under a HOA.
*There are some weird scenarios I’ve read about where, through legal disputes, people have gotten their homes separated from the attached HOA. But it can end up with really sub-optimal results, one example I heard of, the HOA was responsible for water and trash service, so when the homeowner was able to get their property severed, they also lost their water and trash service. Since this was a housing development kind of out by itself in a rural area, there was no local public water utility or trash service as you’ll find in most more urbanized areas, so the homeowner basically had to find a way to resolve those problems on their own.