How to unlock iphone4 on any carrier?

Someone gave me an iphone 4 this phone is on at&t but i have a prepaid carrier how do i unlock this phone so i can use it with my carrier

The best method is an official carrier granted unlock in this case that retains a full functionality of your iPhone. You can read more details here: http://www.fastgsm.com/en/page/how-to-unlock-iphone

I bought an iphone 4 from at&t and wanted to use it for t-mobile. I found this website unlockatt.com and they unlocked it for me in less than 24 hours. I connected it to itunes and it worked and now i can use it!