You can get an idea for how a radio transmitter works by starting with a battery and a piece of wire. In How Electromagnets Work, you can see that a battery sends electricity (a stream of electrons) through a wire if you connect the wire between the two terminals of the battery. The moving electrons create a magnetic field surrounding the wire, and that field is strong enough to affect a compass.
Let's say that you take another wire and place it parallel to the battery's wire but several inches (5 cm) away from it. If you connect a very sensitive voltmeter to the wire, then the following will happen: Every time you connect or disconnect the first wire from the battery, you will sense a very small voltage and current in the second wire; any changing magnetic field can induce an electric field in a conductor -- this is the basic principle behind any electrical generator. So:
- The battery creates electron flow in the first wire.
- The moving electrons create a magnetic field around the wire.
- The magnetic field stretches out to the second wire.
- Electrons begin to flow in the second wire whenever the magnetic field in the first wire changes.
One important thing to notice is that electrons flow in the second wire only when you connect or disconnect the battery. A magnetic field does not cause electrons to flow in a wire unless the magnetic field is changing. Connecting and disconnecting the battery changes the magnetic field (connecting the battery to the wire creates the magnetic field, while disconnecting collapses the field), so electrons flow in the second wire at those two moments.