To expand on this point, and a similar system in Finland called asumisoikeus:
Municipalities have a pool of housing units. The tenants do not buy the house itself, they buy a right to live in that house, which usually costs about 10% of the price of the house, reimbursed when they move out. They also pay a rent that takes care of the energies and depreciation of the house. Socio-economic status is taken into account when figuring out who's eligible
Now, there are some criticisms of the system, mainly that the rents aren't that much lower than commercial properties. However, it does keep house prices in check. 100m^2 (~1100 sqft) house in the capital region is about 9 years of average take-home income - or 5 years for a couple