Here is what Wikipedia, with rather technical language that I can’t follow, had to say about it:

The theremin is almost unique among musical instruments in that it is played without physical contact. The musician stands in front of the instrument and moves his or her hands in the proximity of two metal antennae. The distance from one antenna determines frequency (pitch), and the distance from the other controls amplitude (volume). Most frequently, the right hand controls the pitch and the left controls the volume, although some performers reverse this arrangement. The theremin uses the heterodyne principle to generate an audio signal. The instrument’s pitch circuitry includes two radio frequencyoscillators. One oscillator operates at a fixed frequency. The frequency of the other oscillator is controlled by the performer’s distance from the pitch control antenna. The performer’s hand acts as the grounded plate (the performer’s body being the connection to ground) of a variable capacitor in an L-C (inductance-capacitance) circuit, which is part of the oscillator and determines its frequency. (Although the capacitance between the performer is on the order of picofarads or even hundreds of femtofarads, the circuit design gives a useful frequency shift.) The difference between the frequencies of the two oscillators at each moment allows the creation of a difference tone in the audio frequency range, resulting in audio signals that are amplified and sent to a loudspeaker.