Annual percentage yield (APY) is the effective annual rate of return on an investment. Learn how it accounts for compounding interest and how it differs from APR.