If you want to quit without deleting your character, you must use a 'Bed to Reality'. Find a bed (probably in a building close to where you entered the game), get on top of it, and Apply it using shift-A (capital A).
