First of all, Lagrange proved that every non-negative
integer can be written as a sum of four squares (and since
the product of two non-negative integers is a non-negative
integer, it's clear).
What you are asking for is probably Euler's four-square
identity; here's a link to Wikipedia:
http://en.wikipedia.org/wiki/Euler%2...quare_identity