Answer:
You can get out by selling your home.
If the HOA agrees to let you out, you can opt out, but in neighborhoods, this is unlikely. If there is some legal problem with the HOA, you can challenge it's legitimacy, but again, this is rare. If enough members want to eliminate the HOA, it can vote to dissolve itself.