To understand the inner working of a digital filer let us consider the simple high pass filter as shown in figure attached.
Here the output is difference between current and previous sample and it will be higher if the difference is more, and
that can only happen for high rate of change of input signal. So the circuit works as a high pass digital filter.
Hope this helps!