Merchants begin trading with your kingdom once you have hosted an Ambassador from any kingdom. They will take time based on the distance of your kingdom from theirs to arrive, and can come in any season. They will wait to arrive if there are enemies present and will return if they cannot find a way into your kingdom. In order to actually conduct trade with them you will need a Market Stall.
Merchants will consume food and drink as well as sleep in any available beds while they remain in your colony. They usually remain for around three days before leaving your kingdom. The goods offered and their prices depends on the origin of the merchant:
Merchant City-State: Their merchants offer standard prices and the widest variety of all the kingdom types, but usually in smaller amounts.
Agricultural Settlement: Their merchants sell only cotton, wool, fruit, grain, wine and farm animals.
Mining Colony: Their merchants sell only stone, dirt, clay, coal and metal ores. They will pay more for drinks, fruit, bandages and pickaxes.
Lumber Camp: Their merchants sell only logs as well as saplings for each of the trees. They pay more for nearly the same items as Mining Colony merchants.
Discovering specialized communities can thus be profitable by buying their goods at a discount (and in larger quantities, which can be useful) and accumulating additional trade value when offering goods they desire. They will however pay less for anything you offer that is similar to what they trade in.
The sale of different metal ores by City-States and Mining Colonies is dependent on your kingdom's Total Worth; as you increase in Worth you will eventually be able to purchase Iron, Silver, Gold and Platinum. Higher Total Worth also affects the the cost of purchasing a merchant's goods; the first time your Worth is high enough the prices demanded doubles.
You can send your own merchants to other kingdoms as well; this is done through the Diplomacy tab. Choose a kingdom that has an Ambassador hosted by yours and click the "Send Merchant" button. This brings up the trade screen where you can specify the goods to be traded and the gnome to be sent to conduct the trade. The selected gnome's travel time is similar to the time taken by arriving merchants from that kingdom.
Ambassadors are representatives sent by nearby gnomish kingdoms that have been discovered by yours. One kingdom (a Merchant City-State) is already discovered at the beginning and additional kingdoms are discovered as your kingdom's Total Worth reaches certain milestones. The type of these additional kingdoms is decided randomly.
To host an ambassador go to your Diplomacy tab under Kingdom at the top of your screen. Choose any of the kingdoms available and you will be presented with a screen allowing you to host their ambassador. Invited ambassadors will travel to your kingdom and arrive based on the distance between your kingdoms. They will wait to appear if conditions in your kingdom are unsafe when they are supposed to arrive and return if they cannot find a way into your kingdom.
Ambassadors require their own personal quarters and will consume available food and drink. They also have a specific room value that must be met to retain them. At the beginning this is 450 and increases to 600, 750, and 1000 as your Total Worth reaches certain milestones. The game will inform you if any requirements are unmet and you will have a few days to rectify the issue before they leave. Retaining a kingdom's ambassador is vital if you intend to receive regular merchants from them every season, but they otherwise provide no other benefit.