A mortgage is simply a loan using your home to guarantee repayment.
Since the repayment is guaranteed by an asset that has historically increased in value and is not easy to dispose of, the risk to the lender of losing their money is slim.
Since the rate of interest is determined by the risk of loss which has historically been extremely low-usually in the 4-6% range, mortgage interest rates are normally very low, making homeownership loans attractive to both buyers and lenders.