A mixer takes two signals and mixes them together. The resulting output is usually both frequencies, plus their sum and their difference. For example, if you feed a 5 MHz signal and a 20 MHz signal, you’d get outputs at 5 MHz, 15 MHz, 20 MHz, and 25 MHz. In a balanced mixer, the original frequencies cancel out, although not all mixers do that or, at least, don’t do it perfectly. [W1GV] has a video that explains the design of a mixer with a dual gate MOSFET, that you can see below.
The dual gate MOSFET is nearly ideal for this application with two separate gates that have effectively infinite input impedance. [Stan] takes you through the basic circuit and explains the operation in whiteboard fashion.
Oddly, you think of a mixer as adding two signals, but it really multiplies them if you think about the trigonometry involved. Consider a sine wave:
In this formula, A is the amplitude,ω is the radian frequency (that is 2 times pi times the frequency in Hertz) and φ is the phase (in radians). Of course, t is time. Now, consider two frequencies:
Keep in mind a cosine wave is just a sine wave with 90 degrees added to the phase. If you simply add these two together you would get f1+f2, but to get the frequencies to add we really need ω1+ω2 and ω1-ω2 to appear in the output. Remember that sin(a)sin(b)=1/2[cos(a-b)-cos(a+b)] — or if you can’t remember, look it up. So multiplying two sine waves results in two phase shifted sine waves (cosine waves) of the sum and difference frequency. This is why the symbol for a mixer has an X in it and not a plus sign.
Mixers are a fundamental part of all but the simplest transmitters and receivers. Many times, you’ll see people use an IC like the NE602 or NE612 that incorporate an oscillator and a mixer together. There are other chips out there, too.