Once the player builds a trading post, different types of merchants in boats arrive periodically. Once they arrive you can trade any resources you've produced in town for more food, resources, livestock, and new types of seeds. Building a trading post also allows you to allow or deny citizenship to immigrants wishing to become citizens in the player's town. This can be a boost to the population, but comes with more food requirements, housing, and the potential for the introduction of sicknesses.
The player can control what resources are stored at the trade post, which can be important as the player can only trade goods which are currently stored at the trade post.