Around 1700 the great Newton, who founded the laws of mechanics on 3 principles and the universal law of gravitation, supposed that light was made up of small particles. These light particles as any other particle, he supposed, would naturally have mass too.
Since light particles have mass in Newton’s particle theory for light, he deduced that a beam of light parallel to the surface of the Earth, would bend downward under the influence of Earth’s gravitational field. This means the trajectory of light would be a parabola and not a straight line. Light would follow a parabola like a cannonball that is horizontally shot away.
The fact that we don’t notice this effect is – according to Newton – due to the speed of light which is very high. The speed of light was indeed unknown in Newton’s time, but Galilei had shown before that it definitely is extremely fast, possibly infinitely fast.
However, Newton was able to explain geometric properties of light very well with his particle theory. Also in your years of secondary school, you described light as ‘rays’ and you explained a lot of properties of light with geometric optics, just as Newton did. Rays – to a certain extent - can be indeed perceived as a beam of particles.
But Newton did explain refraction with his particle theory too! Let’s see how he did it.
Newton suggested that when particles of light end up in a medium, such as air or water, they are attracted to the particles of that medium due to an attractive force (gravity) between the particles. Inside a medium (e.g. water or air), the particles of light are equally surrounded by particles of the medium. As a result, the attractive force pulls an equal amount on all sides making the net force zero. So there is no effect on the light particles thus the light keeps going in a straight line, as long as they stay inside the same medium.
But there is a difference at the boundary of the media. E.g. in the transition from air to water, as you know the light will break towards the normal (= line perpendicular to the surface). This happens – according to Newton - because there is more matter in the water than in the air and so the light particles are more attracted towards the denser medium. As a result, the beam offsets, makes a sudden bend and refraction is created.
Newton’s explanation seems to work. Who knows. But from this reasoning follows a consequence for the speed of light in a dense medium compared to the speed of light in a thin medium.