The sliding window is generally just a way to limit the input data size to the model. For example, to detect gestures or actions from accelerometer data, it's common to just take the last one or two seconds of data and feed that into the model. I can recommend this online course that explains it very well: https://www.coursera.org/learn/introduction-to-embedded-machine-learning