It gradually thins out as you go higher and higher up. There is no sharp break between the atmosphere and space. Light is a kind of energy that radiates, or travels, in waves. Many different kinds of energy travel in waves. For example, sound is a wave of vibrating air.
Light is a wave of vibrating electric and magnetic fields.
It is one small part of a larger range of vibrating electromagnetic fields. This range is called the electromagnetic spectrum. This is called the speed of light. The energy of the radiation depends on its wavelength and frequency. Frequency is the number of waves that pass by each second.