APY - annual percentage yield, called AER in the UK and Europe - is what a rate actually earns over a year once compounding is included. It is the only fair way to compare two accounts quoting different compounding frequencies.
The nominal rate is the headline figure. APY is what you actually earn once interest starts earning interest during the year. A 5% nominal rate compounded monthly gives an APY of 5.1162%; compounded daily it gives 5.1267%.
The gap widens as the rate rises. At 5% the difference is about a tenth of a percentage point; at 15% it is closer to a full point.
Because two accounts can quote the same nominal rate and pay different amounts. If one compounds daily and the other annually, the first earns more. APY removes that difference so you are comparing like with like - which is exactly why regulators require it to be published.
APY = (1 + r/n)n - 1, where r is the nominal annual rate as a decimal and n the number of compounding periods per year. Reversing it gives the nominal rate implied by a quoted APY, which is useful when a provider advertises the APY but your own projection needs the nominal figure.