Merchants come in various forms and bring various wares with them, like Food, Weapons, Armor, Furniture, Raw Materials, and Utilities. In order to attract merchants to your little village, be sure to build a Market Zone. Merchants can appear in your town as soon as this is set up- so you can be visited as soon as you begin. They will stick around for a little bit before moving on to the next village, whether you traded with them or not.
Different merchants bring different items for trade, and will accept only certain items in return. For example, the Bone Merchant, best described as a skeleton on a skull bike, will only sell bone-themed furniture and items, and will only let you trade items like Human Remains, and Bones.
Merchants can be a great way to aquire resources that are not available on your map. For example, if you're are in a Desert map and have grass blocks around a body of water, you can purchase Wheat, apples and pears, and begin baking pies and breads. If you are unable to find a steady source of iron, you may purchase this from merchants when they visit, so merchants prove very useful and shouldn't be ignored!
You can tell a merchant is in town by either checking your Market Zone, or by keeping an eye on the Merchant Icon which is located on the top of the screen on the very right of the central bar. When the outline is red, there is Merchant activity in your village. This could be the Merchant walking to your Market Zone, that the Merchant is trading, or the Merchant is leaving.