How does the iPhone trade in works?

I heard there's a trade in program for people who have the iPhone 4 to trade it in for the iPhone 5, how does it work would I have to pay to trade it in for the new one, or could I trade it in at target or best buy and would I have to pay to trade it in those store, and would I have to pay to trade it in at the apple store? I wanna how it works.

Apple offers it at their store, you get credit towards the newer version. Not sure it other stores will offer a similiar deal.