$1,000 at 5% for 2 years earns $100. The amount at the end is $1,100. The rate is applied to the original amount for the whole term, so year two earns the same interest as year one.
A savings account that compounds, and a loan whose payment covers interest each month, use other formulas. Those pages are linked below. This one leaves the principal unchanged until the end.