Special side quests pop up during the adventure that unlock four additional classes. Each class unlocks only after you complete the quest, meaning you must turn it in and get the achievement. Classes are unlocked for all future games, even the ones you start from scratch.
You can switch classes mid-game after cryochambers are added to your ship. Place a character in a cryochamber (remember to remove any equipped items first!) to open a character slot. Your newly created character starts out at the same level as the current lowest-level character in your party. You can swap characters from the cryochambers at any time.