The vast majoity of mortgages in this day and age are effected on a capital repayment basis. The monthly payment that you make to your lender includes not only the interest applied to the mortgage but also an amount that reduces the balance of the mortgage.
At the end of your mortgage term, for example 25 years, you will have reduced the balance of the mortgage to zero so you are mortgage-free and you own your house outright (unless you have borrowed money, secured against the home, from anotherb source in the meantime).
With this type of mortgage the term has a bearing on the monthly payment. However, the shorter the term the less you will pay in interest over the life of the mortgage.