Whether you lose a board member to a sale, resignation, foreclosure or other event, your bylaws will explain how that vacancy can be filled.
It is common for bylaws to allow the remaining board members to appoint a unit owner to fill the vacancy. That owner will serve out the unexpired portion of the term or until the next annual election. Generally, unit owners have a right to petition the board to conduct an election before the next scheduled election. As always, consult your association's governing documents for specifics on filling vacancies.