As long as the iphone firmware is 4.0.1 or below then you can jail break the phone. Just a case of going to the jailbreak.com site.
The latest iphone firmware out is 4.0.2 and it's best not to update to it, as you will lose all your jailbroken apps that you have put onto the phone and the memory space that they have taken up. You wouldn't have to reload them back onto the phone if a jailbreak came out for the newer firmware, as from what i've read the apps will just reappear like magic.
plus i think if you update to the newer firmware, it doesn't let you go the jailbreak site, just takes you to the apple site instead.