To shorten/lengthen the term on your mortgage
Shortening or lengthening the term on your loan has opposite affects on your monthly payment. In general, when you compare rates on loans with a shorter term the rates are lower than comparably sized loans with a longer term. The corollary to this statement is that payments on loans with shorter terms have payments that are higher than loans with higher terms due to the increased principal amount required to pay the loan off more quickly.
When you are comparing the refinance of a loan with an already short term to a loan with a short term (i.e. 15 year versus 10 year) you should pay special attention to the interest paid on each loan. The shorter the term on your existing loan compared to the new loan, the lower the interest savings because of how quickly the principal is being paid down. This is very similar to refinancing an auto loan in the last few years of the auto loan.