Do not spread misinformation. AT&T will not unlock the OP's phone. This may be the case in other countries, but not in the US.
The 3G will need to be jailbroken then software unlocked with ultrasnow. However, there is no unlock for 4.1. It has an unlockable baseband. Even if you downgrade to an earlier iOS, you still cannot unlock.
If the OP doesn't have 4.1, iclarified has a number of near foolproof tutorials.