Many people who purchase properties with an HOA sign a contract with rules that waive many of the rights and freedoms that the general public enjoy.  What rights you have left, if any, will turn a great deal on that contract.  So, your first step is to crack it out and see what procedures are listed.  Generally, HOA's are allowed to impose certain authorized expenditures on members.  Because of the power granted through the HOA agreement, they can place a lien on your property and foreclose on the property just like any other creditor.  To stop the foreclosure sale, you either need to pay the money or file a suit to stop the sale of your property.  Your HOA agreement may also have some other remedies.