A homeowners association elects to take advantage of the tax benefits provided by section 528 by filing a properly completed Form 1120-H.
Per the IRS Instructions for Form 1120-H:
A home owners association files Form 1120-H as its income tax return to take advantage of certain tax benefits. These benefits, in effect, allow the association to exclude exempt function income from its gross income.
Exempt function income. Exempt function income consists of membership dues, fees, or assessments from (a) owners of condominium housing units, (b) owners of real property in the case of a residential real estate management association, or (c) owners of timeshare right to use, or timeshare ownership interests in, real property in the case of a timeshare association. This income must come from the members as owners, not as customers, of the association's services.
Assessments or fees for a common activity qualify but charges for providing services don't qualify.