What is a housing lottery and how does it work?

A lottery is used to select a buyer for new units and some resale units. An application is required to participate in the lottery for each unit.