The annual percentage yield (APY) is the real rate of return earned on an investment, taking into account the effect of compounding interest. Unlike simple interest, compounding interest is calculated periodically and the amount is immediately added to the balance. With each period going forward, the account balance gets a little bigger, so the interest paid on the balance gets bigger as well. This measures the real rate of return on your principal tokens amount by taking into account the effect of compounding interest. In the case of PyramiDao.finance, your $PYRA tokens represent your principal, and the compound interest is added periodically on every Rebase event (Every 3 minutes).
Your new principal amount is your then current $PYRA token amount, plus your new rebase token amount. This total amount is what gets calculated for your next rebase rewards.
One interesting fact about APY is that your balance will grow not linearly but exponentially over time! Assuming a daily compound interest of 3%, if you start with a balance of 1 $PYRA on day 1, after a year, your balance will grow to about 10,548 $PYRA. That is the power of compound interest!