This guide and tutorial will show you how to use the freshly released PwnageTool to jailbreak your iPhone 4, iPhone 3GS, or iPhone 3G. There has been a couple jailbreak tools for iOS 4.1 released recently but only PwnageTool will preserve your baseband allowing you to update to a jailbroken 4.1, while still preserving your baseband so you can unlock.
PwnageTool is available for Mac only. If you don't have a Mac, try to find a friend who does, and simply use his computer to cook the firmware. This guide was written using an iPhone 4 but the steps are the same, no matter what iPhone model you have (only the firmware downloaded will change).
This being said, make sure to follow this guide to jailbreak your iPhone iOS 4.1 with PwnageTool. As always when hacking your iPhone, you are proceeding at your own risks...