There are two common ways loans are charged interest:
Interest is calculated on the original loan amount for the entire loan period.
This means you pay interest on the full amount even as you repay the loan.
Interest is calculated on the remaining loan balance.
As you repay the loan, the interest reduces over time.
Flat rate = higher total interest
Reducing balance = more fair and often cheaper