Your payments go towards both interest and principal in a proportion that varies over the lifetime of the loan, such that your time frame is set by the terms of the loan. If you get a 30-year fixed rate mortgage, you pay it back in 30 years, regardless of the loan amount or interest rate. Look up "amortization table" if you're curious.