Degrees of freedom means what it says - in how many independent directions can you move at once. If you're a point moving on a page, you are moving in two dimensions and you have correspondingly two degrees of freedom. The freedom to move up the page and the freedom to move across it. Any motion on a page can be described in terms of these two independent motions. Now consider a sample of size n. It inhabits an n dimensional space. There are n degrees of freedom in total. Each sample member is free to take any value it likes, independently from all the others. If however, you fix the sample mean, then the sample values are constrained to have a fixed sum. You can let n-1 of them roam free, but the value of the remaining sample value is determined by the fixed sum. The space inhabited by the deviations from the sample mean is thus n-1 dimensional rather than n dimensional, since the deviations must sum to zero. The sum of the squared deviations, although looking like a sum of n things is actually a sum of only n-1 independent things, and its natural divisor - its degrees of freedom - is also n-1.