How does the iphone upgrade process work?

I have an iphone 3g, and checked my upgrade eligibility. It said that I qualified for a two year contract + 36 dollars to get the new iphone 4S. My question is does this really mean that I can trade in my iPhone 3g to get an iPhone 4S for just 36 dollars, or does it mean that I just renew my contract for that price? Do I still have to pay the $199 for the iPhone 4S, or do I just trade in my iphone 3G?

This always varies, I think you have to check the at&t site to see what it is right now. Iphone 5 is coming out so 4S might be a really good deal right now.