How a home loan works is when you borrow funds from a lender (e.g. a bank) in order to purchase a home. The lender expects you to pay back the entirety of the borrowed funds plus interest.
Interest is an added expense to the borrower to cover the risk the lender assumes when lending money (e.g. in the event the borrower can’t repay the loan). This is expressed as an interest rate.