You just collect enough gold coins by your missions and the gate will open and you can put a step in a castle. You have to jump on platforms or clouds to collect the golden coins. Be careful with dark clouds, you maybe burnt by lightning. You also avoid impacting on the birds flying in the sky, you will lose 4 or 5 gold coins. To collect a lot of golden coins at the same time, manage to collect magnetic bubbles. You also can collect fireballs to kill the birds. Do not forget bubbles contain hearts in that which can save you a life. If you win a stage you will have a prize that is a bubble which can protect you and help you fly up.