When you first start the game, you will be presented with 4 castles, and you can choose the order you want to do them in.

After you complete all 4 castles, a new one will appear which provides another 2 stages to complete.

After Solieyu has been defeated, you will proceed to the last stage.