To be honest I have never seen an HOA take possession of a home so this would be a first to me. When a lender sells your home at trustee sale the lender needs to issue a notice of default and notice of trustee sale. I would imagine, but am not positive, that the HOA would need to do the same. You need to review the CCRs and HOA documentation to find out. If you cannot find that then you need to contact the property manager or HOA itself to get the information. Whoever gets the home will still be subordinate to whatever loans you have on the home.
The real question here, and sorry to be blunt, is how can you have been so out of touch as to fall so far behind that they are considering a trustee sale?