In order to unlock the currently available characters, you need to do the following.
MUL-T can be unlocked by clearing the first stage five times.
In order to unlock the Huntress, you need to clear stages one, two, and three in one run without dying. This is doable in both single player and mulitplayer mode.
The Engineer can be unlocked by completing 30 stages.
In order to unlock the Artificer, collect ten Lunar Coins and use them to free Artificer from the ice prison inside the blue item shop. Lunar Coins randomly drop from enemies. Once you have 10, you'll need to visit the blue item shop. It can be accessed via a special portal which sometimes spawns after you defeat a boss.
The blue portal can also be opened by donating a single lunar coin to what is called a “Newt Statue” which is a small rock with blue spikes that is usually found in a crevice or some other hard to find location. Once you donate a token to the statue, it will say “A blue orb has appeared” in chat. Once you get this message, you must activate the teleporter and defeat the boss before it is full charged. After this, assuming you got the blue orb message in chat, the portal will open and you can enter the bazaar to unlock the new class.
To unlock the Mercenary, you'll need to clear seven stages in one run and go through a special Celestial Portal. Using it will take you to a Celestial Realm with a short jumping puzzle inside. At the end of this puzzle you'll find a large obelisk which gives you the option to "obliterate" yourself. Obliterating yourself at the obelisk will end your run immediately and unlock the Mercenary. (If you already have the Mercenary, you can instead take the return portal next to the obelisk.)
You can read a more detailed guide here.