On Tuesday, July 27, 2010, US government allowed the users to unlock their iPhone. So the unlocking of iPhone 4 is technically legal and technically possible.
On Sunday, Aug 1 hackers released the browser-based iPhone 4 'jailbreak'. The new software is accomplished completely via mobile Safari loaded on the device. The browser-based software will work on all iOS devices, including iPhones, iPads, and iPods running iOS 4 and iOS 4.01.
The unlocking of certain locked products like iPhone 4 is technically known as 'jailbreak'.
The 'jailbreaking' will allow the users to run third-party applications on their iPhones that have not been approved by Apple. It will also allow to run devices on non-authorized networks.
The jailbreaking software can be downloaded from hackers' website.