You may need to apply for Australian visiting visa. Then fly to Perth in Western Australia and take the flight to Cocos Keeling Islands. Only virgin Australia airline flies there. Check in their website to book the tickets. Flights depart twice a week (every Tuesday and Friday). Make sure you check the availability of the accommodation before even booking flights because there's very limited accommodation and they sell out very quickly. To book accommodation, go to cocoskeelingislands.com.au/ website.