I have two questions.

Does anyone know what the name of this identity is or what I should look up to find out more information about it?

How is this identity used to prove that all integers can be represented as $\sum_{k=1}^n\pm k^2$?

Here and here are the two places where I have seen this identity. I have been unable to find out more about these topics as I don't know what I should be looking for.