Surviving on a desert island is one of the most difficult things you can do. It's something that only happens as the result of a tragedy and you are never prepared for it. It will take all of your smarts and all of your cunning to survive and stay healthy. One wrong move or decision and it might be your last.
Get to land. If you see it, you should swim towards it. Your chances of surviving and being found are infinitely better on an island than they would be while lost at sea. When swimming to an island, be very careful. Once the water starts to become shallow, razor sharp coral is your first enemy. If you get stuck on it or slammed against it by a wave, your journey could be over before it really begins. This sharp coral will cut right through you like a knife. And if you do not bleed to death, the infections you will obtain are sure to claim you. So get to shore.
Just swim, and try to avoid the waves as they crash out at sea. Get yourself to shore and onto dry land.
Once you are there, take off your clothes so they can dry. You'll need to stay warm and stay healthy.
Make a shelter. You want it to be out on the beach near the ocean so that you have a good view of any ships or anything else that might pass by you and your island. You are the only lookout so make sure you can see everything.
Make sure the area is clean and open, but be near some trees. Trees will be your shade for what is most likely a hot, beating sun. Find some trees to help you set up against and make sure to use their leaves and branches as shade.
Make a bed that is up and off of the ground. You do not know what will be crawling around at night and you don't want those things in your bed. One way to do this is to make an "A" shelter. Set up two sets of two large branches about 7 or 8 feet apart (this is the length of your bed). Stick them in the ground (or leaning against a tree) so that the they cross in the middle, high enough that you can lay under it. Put some branches going across on either side of the "A"s. This is your bed, and if you can find something to tie it, you'll be able to place it a few feet off of the ground. Try to make it comfortable and give it a roof. Use what you can--leaves or giant plants.
Protect yourself. The odds are that if you are stuck on some desert island that the sun is absolutely baking you. So you need to protect yourself from the sun. If you get sunburned you will not be able to do the tasks required to stay alive. Find a tree and stay in the shade, or build something that provides some protection during peak tanning hours. If there are coconut trees, the oil from the coconut can help protect your skin like suntan lotion, so use it to protect your body.
Obviously, you need to stay out of the way of any harmful animals or critters. Until you learn more about the island, stay on guard for anything that might stalk you. This means looking out for large animals (if there are any), critters on the ground or any type of flying bug that might bite you.
Drink as much water as you can. When you are out in the hot sun all day, you'll need about 10 liters of fresh water to replenish your body's supply. Unless there is a well somewhere, rain water is probably going to be your best and easiest bet. The best thing to do is to put out water traps to collect and store as much as you can. Large plants with giant leaves are a good way to collect water and funnel it into a receptacle. Set up a system so that when it rains, you are ready. (Your roof is a good medium for this).
Never drink ocean water.
Look for pockets of rain water that have been collected. Nature has some wonderful natural resources that might act as water receptacles and your personal life saver. So look around for some and see if you can squeeze out some fluids.
Coconut milk is a good fluid and might be readily available.
Find some food. But you need to be careful what you eat.
One of your best sources for food will probably be the ocean. In it you can catch any amount of fish that will be very good for eating. Make a spear with a long branch so you can catch the fish and bring it back to shore. Basically anything you will be able to catch will probably be good enough for you to eat. (And you're on an island, so you can't be choosy). So whatever you can find, you should eat.
Fish can often be consumed raw if you want to (sushi), but it will always be safer to cook them over a fire just in case. So do what you feel comfortable with or what you think tastes better.
Here are some tips for catching fish: Fish congregate in the coral, so look for big groups and get down there to find fish. You will most likely have to dive down a bit to get to the fish so, in order to train your body to stay under water longer, dive many times and eventually your lungs will expand and you will be able to stay long enough to catch something good.
Coconuts can provide a little nutrition, so eat these if you want.