digital filter!
Welcome to the wild world of digital signal processing!
Let's say you are talking over a telephone that digitizes your voice at 8 thousand samples per second (8 ksps). If you whistle at 1 kHz, then the digitized signal may look like this. Notice how it repeats every eight samples, like points on a sinewave:
0, 141, 200, 141, 0, -141, -200, -141, 0, 141, 200, 141, 0, -141, -200, -141, ...
Now let's say you want to design a 1 kHz bandpass filter. Well, very basically, you write a program or design some digital hardware that passes signals that repeat every eight samples, and attenuates signals that repeat at some other rate. How to design such a thing? Well, grab yourself a book on digital signal processing and digital filter design!
How do you test such a filter? Well, there are all sorts of methods. One way, you can simply feed various frequency signals through it and observe what happens.