Let
x = APR
y = APY
n = componding frequency
It turns out that we can connect those three variables with the equation
y = (1+x/n)^n - 1
For example, let's say that a credit card advertises an APR of 20% and the compounding frequency is 12 times a year (aka monthly). This would mean x = 0.20 and n = 12 and y is...
y = (1+x/n)^n - 1
y = (1+0.2/12)^12-1
y = 0.219
So the APY is roughly 21.9% compared to the APR value of 20%. This increase is due to the fact that compound interest adds up over time. Even the smallest change can have a big effect later down the road. The credit card company will want to advertise (and often does advertise) the APR value to lower the perceived interest rate.
On the flipside, if a bank wants to increase the interest rate of a CD (certificate of deposit), then the bank will advertise the APY value to effectively inflate the interest rate to make the product seem more rewarding. So it simply depends on which side of the fence you're on. With credit cards, it's about paying money back while bank CDs are about paying you money. Both are connected to the same basic idea.