Question: how the electromagnetic spectrum works?
Answer: Electromagnetic (EM) radiation is a stream of photons, traveling in waves. ... Low-energy photons (such as radio) behave like waves, while high-energy photons (such as X-rays) behave more like particles. You can read more about how photons work in How Florescent Lamps Work. EM radiation can travel through empty space.