This page contains spoilers! (As if the page title wasn't obvious...)
There are three endings in the game. Which ending you get depends on how many rooms you've skipped.
Good Ending
If you explore all (or nearly all) of the rooms, you are presented with the good ending.
Exile Ending
If you skip some of the rooms or if you cheat, you are presented with the exile ending.
Bad Ending
If you skip many of the rooms, you are presented with the bad ending.