An HOA or Homeowner Association is a legal entity created to manage and maintain the common areas of a community. Typically these "common areas" consist of things like pools, clubhouses, landscaping, parks, streets and roads.
HOAs can consist of single family homes, condominiums, or town homes and are typically setup by the original developer of the community with a set of rules called "Declaration of Covenants, Conditions, and Restrictions" otherwise known as "CC&Rs".
One of the primary functions of the HOA is enforce and ensure that these "CC&Rs" are adhered to by the individual homeowners. The guiding principles of these regulations are normally to help maintain property values and the quality of life within the community.