It still moves as a wave and has a wavelength. That wave is electromagnetic and interacts with the electrons and protons in the atoms of whatever it's traveling through. The medium it's refracting through acts like a viscus fluid compared to the vacuum.