Residual Analysis

I'm wondering if someone can give me a brief explanation of what residual analysis is and what it's used for. I know it can be used to test for normality, and for detecting outliers, but I'm not sure how. My book doesn't really help.

When the residuals are graphed, if one residual is particularly farther away from the x-axis than others, then we can conclude that the corresponding y-value is most likely an outlier. Also, the residuals are used in finding the Root Mean Square Error (RMSE), and this determines how good a model is relative to a data set.

$\displaystyle \sum_{n=2}^{n} \frac{(z_i-x_i)^2}{n-2}$

Where z represents the model, x represents the data set. Notice that the upper part of the fraction is actually just the residuals squared. Sorry about the summation symbol, Latex was being uncooperative.