The linked post gives you an example of how to create patches using a kernel size and a stride.
You can ignore the padding as well as the “reshape back” section for now.
Each patch will represent basically the sliding window approach of a convolution, so that you can apply any method on it.