Linear functions when expressed as polynomials only have terms of degree 1 or 0. Non-linear functions have at least one term of degree 2 or higher. For example, here is a linear boolean function: $y = ax + bz + c$, where $y$ is the output bit, $x$ and $z$ are input variables, and $a$, $b$, and $c$ are constants. Notice that none of the variables are multiplied by each other -- they are only ever multiplied by constants in a linear function.
But with non-linear boolean functions, there can be terms with more than one variable in them, e.g.: $y = axz + bx + c$. The number of variables in a given term (including when a variable is multiplied by itself) determines the 'degree' of that term, so in this example there is a term of degree two in the polynomial.
Edit to add: So your question is now what is the Hamming distance? Take two strings of equal length and xor them together, then count the number of 1's in the resulting string -- the more 1's, the greater the 'distance' between the two strings. When you take the truth table of a non-linear function (truth tables can be thought of as just another binary string) and the truth table of any linear or affine function and xor them together, there will always be at least one 1 in the result, no matter which linear or affine function you are comparing the non-linear function with. The greater the 'distance' from all linear functions, the more non-linear the function.