Charged particles, such as a proton or an electron, create an electric field.
Though we cannot see electric fields, they do exist. The way that we detect them is their effect on matter.
In the simulation below (originally written by Bruce Sherwood), you will see the electric field (represented by arrows) at various locations in space around a positively charged particle. Click the "See 3D View" button to see electric field in three dimensions. Click the "Make Charge Negative" button to see the electric field around a negatively charged particle.
Where is the electric field produced by a charged particle greater in strength, near the charged particle or far from the charged particle?
If the electron is not stationary but instead moves back and forth like a vibrating cell phone, then it produces an oscillating electric field everywhere in space around it. This is called an electromagnetic wave.
The simulation below (written by Bruce Sherwood) shows the radiating electric field due to an oscillating electron in an antenna. Click the Run button to start the animation. You are seeing what we call radiation. An example of radiation produced in this way is the oscillation of electrons in a radio transmitter that transmits radio waves for FM or AM stations or for cell phones.
The oscillating electric field in turn creates an oscillating magnetic field. That's why we call light an electromagnetic wave. You can see this by clicking the "Show B" button in the simulation above. The peaks of either the electric field or the magnetic field are called the wavefront.
Whereas water waves need water and sound waves need a gas, liquid, or solid in which to travel, light needs no medium. Light will travel in a complete vacuum that is void of any matter at all. That's because electric and magnetic fields are produced by charged particles but exist regardless of whether there is any matter there to experience the fields. That is, electric and magnetic fields in an electromagnetic wave both exist and propagate in a vacuum.
(Note: a perfect vacuum is defined as a region of space that is void of any matter. However, outer space actually has some atoms and is not a perfect vacuum. On average, outer space has a few atoms--mostly hydrogen--in each cubic centimeter.)
Light from a star does not travel in one or a few directions (like the waves from the antenna in the simulation which are not emitted at all along the axis of the antenna). But rather, light from a star travels outward from the star in every direction. That means that the wave fronts are actually a sphere. A single wavefront (crest of wave) grows larger and larger like a spherical balloon blowing up.
It's probably easier to picture this in two dimensions using circles. If you throw a pebble in a pond, it produces waves with circular wavefronts that get larger in diameter as the waves travel outward. The animation below (written by Bruce Sherwood) shows the waves produced by something like a floating bobber that is moved up and down in water, thus creating the circular waves. The red lines are called rays--they are radially outward from the light source and perpendicular to the wavefronts.
Each black circle in the above simulation represents a peak (or crest) of the wave. Two consecutive peaks are called a cycle. The distance between peaks is called wavelength. The time it takes for consecutive peaks to pass a certain point is called period. The number of cycles to pass a certain point in one second is called frequency.
(I know that this is a lot of vocabulary all in one paragraph, but you'll get a chance to understand these words in the next section.)
In actuality, stars emit light spherically. The simulation below shows a single spherical wavefront. In this case, only wavefront is emitted, so it's called a pulse. There is no wavelength associated with this wave because it is not periodic.