First, don't yank it. Make sure the shifter is all the way in park, since many automatics won't release the key otherwise. Press the brake pedal, then turn the key back to the off or lock position while gently rocking the steering wheel. A low battery can also hold the key in on some vehicles, because the shift interlock needs power to let go. If it still won't come out, stop before you bend or snap the key.
A key that sticks often, or one that only comes out after a fight, is a sign that the ignition lock cylinder or the key is worn. If your spare works smoothly, the key is the problem; if the spare sticks too, it's the cylinder. Either way, it's a far smaller repair before the key breaks off inside. Have it looked at by our technicians at whichever C&C shop is closest, and bring the spare along so we can compare.