Before they give you your new phone, they go back into their computer system and essentially remove your iPhone/AT&T plan from the system. When you plug in your new phone, you go through the activation again, my selecting "I am an existing AT&T customer" and "replace an existing phone with this iPhone" and then you choose your rate plan again. You then wait for activation again. Both times I activated (1st on original and then on replacement) it took less than 3 minutes.
iTunes stores a backup for your phone each time you sync, which is accessible thorugh iTunes preferences in the iPhone tab. You should be able to re-load your old configuration onto your new phone without issue.
The AT&T rep told me if you're charged a second activation fee to call and have it refunded. I swapped phones, the Apple Store swapped SIM cards so I had the original card, and pretty much everything was there but my password for the phone. Unfortunately, the new one didn't work and better than the old one.