In more detail
Because fees are included, the APR is usually higher than the quoted interest rate and is the fairer way to compare loan offers. It is found by asking which rate makes the payments repay only the cash you actually received after upfront fees. What must be included (origination fees, some insurance, points) is set by law and varies by country, so compare like with like. A nominal APR does not include compounding: a credit card at 24% APR charges 2% a month, which compounds to 26.82% a year.
Why it matters
Two loans with the same interest rate can cost very different amounts once fees are counted, and a low headline rate with high fees can be the more expensive offer. Comparing APRs over the same term exposes that.
Example
A $10,000 loan at 7% over 36 months has a payment of $308.77. If a $300 fee is deducted so you receive only $9,700, the same payments correspond to an APR of 9.07%. Total cost: $1,115.75 of interest plus the $300 fee.
Common confusion
The APR is a borrowing cost; the APY is a savings yield that includes compounding.