In the nineteenth century, James Clark Maxwell showed, mathematically, that electric and magnetic fields could be made to oscillate, or vibrate, so that their effects could travel through space at hundreds of millions of meters per second. This spreading of energy is known as electromagnetic radiation and it comes in many different varieties. The complete range of varieties of radiation is called the electromagnetic spectrum. The type with which you are most familiar is, of course, light. When you see the light of a star, it is because the retina of your eye experiences changing electric and magnetic fields which were originally generated by that star trillions of kilometers away. By the time all this reaches your eye the effect is quite feeble. That is all right. Your eyes are fairly sensitive.
Now, when you see that star, the fields on your retina are changing direction about 300 trillion times every second. That's what we call light. But there might also be electromagnetic radiation coming from that star which is oscillating only a few million times every second. That is called radio, and you can't see radio. There might also be radiation coming from that star which has a frequency of thousands of trillions of times per second. That would be x-rays. But, of course you can't see x-rays. Even if you could, those x-rays would not make it down to the surface of Earth. Good thing, too. X-rays are not very good for you if taken in large doses. At the far end of the electromagnetic spectrum are gamma rays, with the shortest wavelength and the highest energy.
So the universe is flooded with all of this electromagnetic radiation. A diagram of the different types of radiation has some terms which should be familiar to you. This diagram also shows that, the opacity of our atmosphere is such that, only visible light and radio are able to make it through our atmosphere. Ultraviolet and infrared are just outside the range of visible light but their effects on humans are quite noticeable. Ultraviolet can cause your skin to tan or burn depending on your pigment. Many flowers have strong ultraviolet markings that must be visible to pollinating insects. Infrared is sensed as heat. Infrared is sensed as the heat you feel from a campfire after the embers have cooled to the point where they give off no more light.
It is important to note that electromagnetic radiation is, pretty much, the only way we know about the workings of the universe at all. Understanding how this radiation passes through space and how it interacts with objects in the universe is critical to understanding the universe itself. And limiting ourselves to just visible light and radio gives us a rather incomplete view of the universe.
A lot of things can happen to electromagnetic radiation on its way through space. It can be refracted, or bent away from its straight line path as it passes through interstellar clouds of gas. The effect is very small, but it can occur over great distances. Very massive objects can also cause light to change direction because of the intense gravitational field around such objects.
If the source of electromagnetic radiation is moving toward or away from us, the wavelength of that radiation can change due to something called the Doppler Effect. Objects which move away from Earth experience a red shift. Objects moving toward us show a blue shift.