1D convolution for uni-variate data
I believe that the following image (original link) will be helpful to understand. 1D convolutions work exactly the same way as 2D convolutions, the main difference is how the filter/mask is applied. 1D convolution is intuitively like a sliding window of a certain width.

Many packages like Keras or PyTorch have native 1D convolution function/modules, so I would recommend checking their documentation and perhaps source code for deeper understanding.