upgrade to ios 4 then use jailbreakme on your device go to this website. jailbreakme.com (in mobile safari, on youre iphone), and it will jailbreak it. to unlock go to cydia and download ultrasn0w, and youre done!
This does not delete anything you may have on your device