The refractive index is related to the perceived speed at which light is going in that medium. Water is more dense than air, ie there are more particles occupying a given space. So when light travels through water, there is a higher probability for it to bump into water molecules. Hence its path will deviate from a straight line, it will be a bumpy path. Hence, on a microcoscopic level, the photon is actually travelling a longer bumpy path when in a denser medium, that is why it is perceived to be slower. So the actual speed of light doesn't change. The path it takes in a denser medium is longer than a less dense counterpart.