When you connect the battery, the voltage in the wire is 1.5 volts, and when you disconnect it, the voltage is zero volts. By connecting and disconnecting a battery quickly, you create a square wave that fluctuates between 0 and 1.5 volts.

Simple Transmitters: Make Your Own

To create a simple radio transmitter, what you want to do is create a rapidly changing electric current in a wire. You can do that by rapidly connecting and disconnecting a battery, like this:

A better way is to create a continuously varying electric current in a wire. The simplest (and smoothest) form of a continuously varying wave is a sine wave like the one shown below:

A sine wave fluctuates smoothly between, for example, 10 volts and -10 volts.

By creating a sine wave and running it through a wire, you create a simple radio transmitter. It is extremely easy to create a sine wave with just a few electronic components -- a capacitor and an inductor can create the sine wave, and a couple of transistors can amplify the wave into a powerful signal (see How Oscillators Work for details, and here is a simple transmitter schematic). By sending that signal to an antenna, you can transmit the sine wave into space.