First, you have to be at least level 15. Then you go to a broker. He or she will show you all the neighbourhoods and the available houses.
The brokers are (with links to their locations):
Selecting an address opens two more options on the bottom, Visit and Buy.
Visit ports you to the house. You can then check out the interior, the location, just walk around the house and neighbourhood. If you decide to purchase the house, go to the For Sale Sign, rightclick, and the Buy House pop-up will show.