This is often considered for homebuyers who intend on staying in their home for several years, a fixed-rate loan has a predictable monthly payment for the life of the loan.  The duration of the loan impacts the dollar amount of the monthly payment, amount of interest paid, amount of time to build equity in a home, and length of time to pay off the loan.
Longer term loans have lower monthly payments and pay more interest over the life of the loan, taking longer to build equity and pay off the mortgage.
Shorter term loans have higher monthly payments and pay less interest over the life of the loan, taking less time to build equity and pay off the mortgage.
In general, the longer your loan term, the more interest you will pay. Loans with shorter terms usually have lower interest costs but higher monthly payments than loans with longer terms.