Do you have to die to unlock/use a new character in Don't Starve?
I'm new to the game and I noticed that when I died after a few days I almost unlocked the second character.
Is this the case to actually unlock the characters and use them or do they unlock after you reach so many day and can you switch character in game?
Because I wouldn't like to last X amount of days and then have to die just to use a new character.
You only gain experience at the end of a game. There are two ways for this to happen.
The first, and most common way, is to die. Fortunately, you don't need to worry about killing yourself to unlock a new character- thanks to the spiders, hounds, cold and, of course, starving, dying will happen on its own.
The second is difficult and more complicated but it is one of the things which could be considered "winning":
During your travels, you will find Things. These Things appear useless but are actually used to assemble the Teleportato. There are five Things in total- four items (Ring Thing, Crank Thing, Box Thing and Metal Potato Thing) and a structure- the Wooden Thing. Attaching all four Things to the Wooden Thing will allow you to start a new game, keeping your inventory.
Doing this will earn you experience and will allow to to use a character unlocked with it.
Most character in Don' Starve are unlocked by accumulating experience. As you can see in the linked article, the only way to gain experience is either by dying or by going into another world. Only Wes and Maxwell have different requirement to unlock them, linked to the Adventure Mode.
Since you need to start a new game to use another character anyway, you'll most likely be dead by the time you can change. Don't Starve have many roguelike elements, and dying is both easy and common. You most likely will not choose to die, and unlocking character will come gradually while playing the game.