To buy and sell goods, you must research the first level of Merchant Guilds; this is available when Level 2 of Mathematics has been completed. A market will become available via the industry buildings menu, and can be placed anywhere in the village. Once the market has been built, you can recruit merchants. As you advance in rank, research will become available for more merchants per market, as well as the ability to trade with more markets.