Citizens of 129 countries have been allowed to buy since May 2012 without any restrictions. These include, among others, all European countries, USA, UK, Australia, New Zealand...
Citizens of some countries (Iraq, Iran, and Palestine, among others) have restrictions on the purchase of land for growing fruits and vegetables and must obtain a special permit.
Some countries have restrictions and special conditions for the purchase of real estate (Jordan, Israel, Fiji, Morocco, Egypt, Afghanistan...), but if they meet the conditions, the purchase is possible.
Citizens of Syria, Armenia, North Korea, Cuba, and Nigeria are not allowed to shop.
When you buy, you are not only the owner of the apartment but also the land on which the facility was built.