If you fire a bullet in air, after sometime it comes to rest because of air resistance like forces. but what about photons? If they are also particles, then the same thing should happen with them. Does not matter how long it takes but they should come to rest as well while travelling through a medium. It happens or not?
A photon is a particle but it has no mass, that is, mass is zero. Because it's mass is zero, it must always travel at the speed of light: $299,792,458$ m/s. Thus, it is never at rest -- Never.
However, this does not mean that a photon is constantly moving forever. Photons interact with other particles that just get into their way. For example, a photon can strike an electron in an atom be completely absorbed with the result that the electron is knocked into a higher energy level representative of the energy given to it by the photon. The photon itself at that point ceases to exist.
But, usually that excited electron is not stable at that higher energy and it will fall back down to the lower energy level where it was before and another photon of energy will be released and this new photon then continues traveling at the speed of light until it interacts with yet another particle.
If you fire a bullet in air, after sometime it comes to rest because of air resistance like forces.
A bullet is a particle defined in classical mechanics, , it has a mass within a volume in space and at time t its center of mass has a well defined trajectory.
but what about photons? If they are also particles, then the same thing should happen with them.
There is a huge difference between the two concepts, because elementary particles even though they have a well defined mass are point particles. The term "particles is used because trajectories can be calculated, but the physical behavior is controlled by the probabilistic equations of quantum mechanics..
Light is built up out of zillions of photons, but photons are not light. Because of their zero mass they can never be at rest and always travel with velocity c. Have a look at this answer of mine to a related question.
Light can be slowed down and even stopped , but that is another story.