Understanding the lowpass filtering of a digital signal
Any signal can be constructed from the sum of sinusoids of different frequencies (to within an arbitrarily small error).  This reconstruction is unique and can be calculated with the Fourier transform.

When we talk about the various frequencies that comprise a signal, we are talking about these sinusoids of various frequencies.  In fact, in signal processing, we are used to thinking about the same signal in the time domain -- as a function that gives a magnitude for every instant in time, or in the frequency domain -- as a function that gives a magnitude and phase for every frequency.

When you apply a low-pass filter, you are modifying the frequency domain view of the signal so that all frequencies higherthan the cutoff have their magnitudes set to pretty much zero.

Another way of thinking about it is, you take all the sinusoids that make up the original signal, and throw away the ones with frequency higher than your cutoff.

The secret to how this actually works is called the "convolution theorem": https://en.wikipedia.org/wiki/Convolution_theorem

The convolution theorem shows that convolving two signals together is the same as multiplying their frequency-domain representations together.  A "low pass" filter is just a signal that has a constant magnitude for frequencies below the cutoff, and near zero magnitude for frequencies above the cutoff.

When the filter is convolved with the input signal, the input signal's high-frequency components are multiplied by zero, effectively removing them.