A new unlock solution for the iPhone 4 has been released, promising to cut the ties between the Apple smartphone and AT&T (or, indeed, any other carrier the handset may be locked to). The handiwork of the iPhone Dev Team, the iPhone 4 unlock is integrated into the latest version of their ultrasn0w tool.
Ultrasn0w is available through the Cydia unofficial app store, for which you'll need a jailbroken handset in order to install and access. That can be done using JailbreakMe, a simple online interface whereby sliding a single control automatically takes your iPhone 4 through the jailbreak process.
Currently ultrasn0w works with iPhone4 baseband 01.59 (along with iPhone 3G/3GS basebands 04.26.08, 05.11.07, 05.12.01 and 05.13.04); if you're having trouble finding it in Cydia then you may have to add the repo666.ultrasn0w.com repository. If you're thinking of trying it, it's worth bearing in mind that Apple don't look kindly on jailbreaking and may void your warranty; as ever, hack at your own risk.