Board anything floating. Right a capsized boat and get in. Most boats will support you even when full of water. If it cannot be righted, climb on top. Do not try to swim, unless to reach a nearby boat, another person, or nearby object to climb or lean on.
Swimming causes heat loss and can reduce survival time by half.
Remain as still as possible, however painful it may be. Intense shivering and pain are natural body responses, which will not kill you. Heat loss will. Huddling together can extend survival time 50 percent longer than swimming or treading water. Knees to chest, arms to sides and clasp your hands.