Light travels through space as an electromagnetic wave that does not require a medium in order to transfer energy. Due to its dual nature, light consists of both a wave of electromagnetic radiation and particles known as photons.
All light possess both particle-like and wave-light attributes. Unlike mechanical waves that require a medium, electromagnetic waves are able to propagate even within a vacuum. Electromagnetic waves are described in terms of frequency, energy or wavelength. While photons are particles that consist of discreet packets of energy, they are able to travel through space due to the wave-light properties of light. Physics is still unable to answer many basic questions regarding the nature and behavior of light.
The speed of light varies through different mediums because photons can be absorbed and reflected even though they possess no mass. Since there is no medium to interact with in space, light is able to travel at faster speeds than when it moves through atmosphere. Gravity is the only force that is able to alter the speed at which light travels through space. The strong gravitational attraction of massive objects, such as black holes, is able to slow the speed at which light moves and may even be able to keep light from traveling at all.