This code is setting up finite differences that are being used. For more information on ListCorrelate, please see the documentation for the function: [ListCorrelate—Wolfram Documentation
{](ListCorrelate—Wolfram Documentation)1,-2,1} represents the coefficients in the finite difference formula.
See the documentation for what the third argument does in ListCorrelate. It changes how correlation is aligned.