Ships can be bought in the Special section of the in-game store. The number of ships you can have is limited: 4 ships per town.

You can buy ships once you reach certain population thresholds. Build more houses to unlock more ships.