Campfires set your spawnpoint and heal you. They also allow you to change your sword.
Find chests to collect more sword parts.