Do an internet search for trapped dipole antenna, you will find a wealth of information.
Below is a picture of a 40 meter/80 meter trapped dipole antenna. The traps are the capacitors and inductors in parallel.
In operation the traps limit (block) the 40 meter signal so it uses only the inner part of the antenna. For 80 meter operation the traps allow the 80 meter signal to use the entire antenna.
In simple technical terms the traps form parallel tuned circuits. At their resonant frequency, in this case the 40 meter band, the traps present a high impedance to the signal, limiting it to the inner part of the antenna.
There are many construction techniques for building traps, but in general, schematically they are shown as a capacitor and inductor in parallel.
Trap antennas are not limited to just two band, there multi-band antennas that can be purchased or built.