The game ends when a player has purchased his fourth building. After that round finishes, the player with the most points worth of buildings is the winner!
At the heart of Harbour is a dynamic market mechanism. Each time a player purchases a building, the value of the resources they used drops, while the value of the other resources rise. You'll have to carefully time your purchases to take advantage of the ebb and flow of market prices, or be prepared to waste some resources!