As you explore your world in Terraria, you may encounter special NPCs to trade and buy from. These NPCs usually have a unique requirement for spawning, and always need a valid house to move in. However, many of these NPCs can give you access to valuable renewable resources as well as access to items that can help you progress.
For example, you can get the Goblin Tinkerer to help you change the modifiers on your equipment to ensure you have 20% extra damage or speed. You can also trade with the Steampunker to help you with your wired contraptions.