Question: Assume x is a n by 1 column vector, then , it is easily known that $x^Tx$ is the sum of squares. When calculate $xx^T$, it will give you a n by n matrix. I am wondering what is the mathematical meaning of such results.

Answer: 
If $x$ has length 1, then $xx^T$ is the orthogonal projection on the subspace of $\mathbb{R}^n$ (endowed with the canonical scalar product) generated by $x$.
$x$ and $x^T$ are actually matrices which represent linear maps from one vector space to another and their multiplication is the same as composition of the corresponding linear maps. In your case $x$ is a map from 1 dimensional to n (the length of the column) dimensional space and $x^T$ is just the opposite (from n dimensional to 1 dimensional). Or the number of columns is the dimension of the 'starting' space and the number of rows - the dimension of the 'ending' space. Now if you compose the 2 maps (multiply $xx^T$) you should get linear map from n to n dimensional space, which should be represented by $n$ x $n$ matrix. Same logic applied to $x^Tx$ shows you why you get just a number.