A closed shop is a form of union security agreement wherein the employer agrees to hire union members only. Further, these employees must remain members of the union at all times in order to remain employed.
In the U.S. the hiring and employment of union members alone is illegal under the Taft-Hartley Act. Before the Act, a union could require an employer that had agreed to a closed shop contract to fire an employee who had been expelled from the union for any reason.
The legal status of closed shop agreements varies widely from country to country. It is banned in some nations, it is regulated by law in some other nations.