Travel in Straight Lines
One of light's most notable features is that it travels in straight lines. If there's nothing around to disturb the path of a photon, that's exactly what it will do: travel in a straight line. Since most of space is empty, most of the time most photons just keep going, for incredibly long times. For example, light from the most distant object detected travelled 13 billion years to reach the Earth. That's a long trip. There are other fates possible for a photon in outer space.
Interacting with Matter
When light encounters matter, one of three things can happen. It can transmit right through as if nothing was there; it can scatter off; it can get absorbed. Views of interstellar gas clouds show those interactions. Some light from stars behind the cloud will make it through. Some light from neighboring stars will reflect off the cloud. Some light will be absorbed and heat up the cloud, making it glow in the infrared.
Curved space
The universe is full of empty space, but even empty space can sometimes be interesting. One of the consequences of Einstein's theory of general relativity is that space can be curved. Objects with mass change the nature of space around them. For everyday objects this effect is completely imperceptible. If an object is heavy enough, though, the curvature it induces can be detected. What this means for photons in space is that the normal straight lines they would like to travel become curved. This is observed in an effect called gravitational lensing.
Redshift
There's one more way in which the nature of space itself modifies the way photons travel. The universe is still expanding, impelled by the original impulse from the Big Bang. It's not that all objects are spreading apart from each other, but that space itself is spreading between the objects. If the path between a distant star and the Earth is represented as a thick rubber band, it's as if the rubber band were stretching. An ant that started walking from the far end of the rubber band would have its path stretched more than an ant that started somewhere in the middle. That same thing happens to photons. Distant photons are slowed down more than closer photons. This has the effect of stretching the wavelength. This is the famous "red shift" discovered in the early 1900s.