In GTA 4, Niko can indeed swim across to other islands, but there is a catch: they need to be unlocked first. If he tries to swim toward a locked island, the police will open fire and cut him to pieces.
Once Niko is in the water, on-screen instructions for how to swim will appear, tailored to whichever console you are playing on. Just keep in mind that he cannot dive or swim underwater, so plan your route along the surface accordingly.