Waves are vibrations that transfer energy from place to place without matter (solid, liquid or gas) being transferred. Think of a Mexican wave in a football crowd - the wave moves around the stadium, while each spectator stays in their seat, only moving up then down when it's their turn.
Some waves must travel through a substance. The substance is known as the medium and it can be solid, liquid or gas. Sound waves and seismic waves are like this. They must travel through a medium, and it is the medium that vibrates as the waves travel through.
Other waves do not need to travel through a substance. They may be able to travel through a medium, but they do not have to. Visible light, infrared rays, microwaves, and other types of electromagnetic radiation, are like this. They can travel through empty space. Electrical and magnetic fields vibrate as the waves travel.