When electric and magnetic fields vibrate they create a wave that moves perpendicular to their vibrations.
See model demo here. The wave is a disturbance in the electric and magnetic fields and does not require matter to carry that energy. Unlike other vibration waves, electromagnetic waves do not require a medium; in fact, e-m waves travel fastest in a vacuum with nothing in its way.