If you’re using Windows PC, then to jailbreak and unlock an iPhone, iPod touch or iPad you need Sn0wbreeze tool. It’s similar to PwnageTool for Macs. Sn0wbreeze 2.1 is now available to download. Sn0wbreeze 2.1 works with iPhone 4, iPhone 3GS, iPhone 3G, iPad, iPod touch 4G, 3G, 2G, as well as the new Apple TV.
The utility is verified to work with iOS 4.1 for iPhone and iPod touch, and iOS 3.2.2 for iPad, but there is no word on iOS 4.2 support yet. It allows jailbreakers to preserve their baseband for future unlocks, as well as to use custom IPSW files.