Defenders are NPCs you can find in mercenary buildings, but you can put them in your home too. For that, you’ll need to craft the associated block, and put it where you want the defender to spawn. He’ll do it on top of the block, and will attack any ennemy in range. He will respawn if needed.
There are three kinds of defenders. Knights fight with a sword, and once generated they walk around to protect the area. Knight is the only walking defender. Archers stay on top of their block as long as nothing pushes them away. They shoot enemies in range with arrows. Mages don’t move either, and they throw blocks of fire in range.
Both knights and archers have two strength levels.