High frequencies are highly-frequent fluctuations from sample to sample. This creates significant differences between samples.
Low frequencies are infrequent fluctuations between samples. A low frequency signal means each sample is very similar to the previous one.
If you want to remove high frequencies and let low frequencies passed (a low pass filter) then averaging adjacent samples reduces the highly frequent fluctuations from sample to sample.
If you want to remove low frequencies and let high frequencies passed (a high pass filter) then you want to remove the similarities between samples and keep the differences. So a simple way to do that is to find the difference between (subtract) adjacent samples.