How radio waves are created by electricity
A lot of natural phenomena generate electromagnetic waves. The burning of helium gas in stars creates heat and light, which are both forms of electromagnetic radiation. Lightning creates a lot of electromagnetic radiation in a large part of the electromagnetic spectrum. The burning of materials like wood also produces heat and light and the decay of heavy isotopes like uranium generates radioactive radiation. There is a lot of electromagnetic radiation out there.
Radio waves in wireless communication
Radio is a natural phenomenon, but we wouldn't be humans if we wouldn't try using radio waves to our advantage. The radio waves that are used in wireless communication are created artificially with electricity and they are used to transmit energy, and ultimately, information. How information can be transmitted with a radio wave is a question we will look into later. Let's first look at how radio waves are generated artificially so that they can be used in equipment like laptops and wireless routers.
Generating radio waves
When electric current flows through a wire, this creates a magnetic field.
The animation above shows a static magnetic field, that is generated by direct current (DC). Direct current is current that flows in one direction.
The electrons flowing through the wire emit small energy packets called photons. The photon emission is what creates the magnetic field.
What photons really are, is hard to comprehend. We know photons only as mathematical equations, like the ones Maxwell came up with. You can think of photons as very small energy packets that behave both as a particle and as a wave. This duality is called the wave-particle duality.
How photons travel and how they behave is part of a sience called quantum electrodynamics. We don't have the answer to obvious questions like what photons really are and what they would look like if we could see them. We just happen to know how photons behave, or are likely to behave.
Direct current versus alternating current
In wireless communication alternating current (AC) is used for the creation of radio waves. This type of current constantly changes direction because the poles that create the electric current are constantly switched at a very high frequency. These changes in direction occur 60 times per second, or, if you want to sound more sophisticated you would say the AC frequency is 60 Herz (Hz).
The changing direction of the electric current causes an oscilating magnetic field which produces radio waves.
So, if we summerize this we can say that radio waves in wireless communication are generated by an alternating current that is applied to a wire. This changing current creates an oscillating magnetic field which results in a radio wave.