Interest rate takes into account the lender’s risk and how much it costs the lender to get the money for a loan. The more risk the lender takes, the higher the interest rate they charge you. You pay a small portion of the interest that you owe in each monthly loan payment.
The interest rate on a fixed rate loan depends on the going market rate and how many discount points that you payup-front. An adjustable rate loan’s interest rate is made up of the index, which is an economic indicator of overall interestrates, and the lender’s margin.