You can purchase any enterable house and hotel for money, just walk up to it and hit "Y", on the right of the main menu will be an option to purchase.
You can also set any bought house as your "home" using the "Set Home" button. This will be where you respawn on death and returning to a server/reloading a save game.
You can fast travel (if enabled) to any real estate you own. Other players cannot.
Prices are affected by the local stability and population. With prices being higher when stability and population is high. Use this knowledge to profit by buying a house when stability is low and selling it again when high.
Any bought house/hotel can be leased using the Y menu once bought. You can not fast travel to a leased house however will receive rent for it every 6 hrs in-game time. Rent will be higher if stability and population is high.
You can build houses in towns you control, and then lease them out if you wish.