A 30-year fixed mortgage is "fully amortizing" — each monthly payment covers part of the interest owed plus a slice of principal. In early years, most of the payment goes to interest; in later years, most goes to principal.
This is why paying an extra $100/month toward principal in year 2 saves you far more in total interest than doing the same in year 22 — you eliminate all the future compounded interest on that $100.
Non-fully-amortizing loans exist too: interest-only loans, bridge loans, and some non-QM products have structured payment periods that don't pay down principal during the initial term.
