There are a lot of apps that support this. The best I've found is yxplayer in the app store or yxflash from Cydia (same thing for free, but requires jailbreak) -- good compatability, fast with non-HD content, etc. You can move the files over using either iTunes or any program that let's you access the filesystem like iPhoneBrowser, then watch them without the need for any conversions.

Conversion is not a good option:

Slow (often about 2/3 the length of the video, so you need to plan ahead)

Lossy (you will lose quality)

Larger files (usually)

Generally a pain in the ass

If you must convert, HandBrake (like the accepted answer suggests) is good but doesn't support all formats - xvid4psp in my experience is slightly better.

If you want to convert MKV files with embedded ASS/SSA subtitles (having spent >5 hours looking for a program that will work for this), version 4 of xvid4psp (doesn't work on Win7 x64) is the only program that will do this. v5/v6 of xvid4psp, HandBrake, etc, etc. will not work.

How can I import incompatible video files into iTunes anf then move them to my iPhone? Everytime I try to drop an avi file into iTunes, I get the "forbidden" mouse cursor.
–
MartinAug 14 '10 at 7:39

@Martin - Once you get yxplayer, go to iTunes, go to your iphone/ipad on the left tree, and choose the "Apps" tab from the top. Scroll down a bit to "File Sharing" (that says "Documents" right under it), and click "yxplayer" from the list of apps. Then you can transfer documents from your computer (though you need to use another tool to transfer folders). Yeah, it's not that discoverable a feature, but Apple doesn't like things that aren't Apple.
–
Robert FraserAug 14 '10 at 9:07

There is no "File Sharing" section in the Apps tab. Does the iPhone need to be jailbroken for that?
–
MartinAug 14 '10 at 9:53

1

@Martin - No it doesn't need to be jailbroken. A picture says 1000 words; I made a guide: nv3wrg.blu.livefilestore.com/…
–
Robert FraserAug 14 '10 at 12:55

Thank you very much, Robert (+1 for the tutorial). In now know, why I don't see the file sharing section. At the time I asked before, the app was not yet installed, but only downloadad. And when I tried to install it, I had to face the fact that it cannot be installed on my iPod touch. Shame on me. The iPhone is ordered, and I will definitely try this app.
–
MartinAug 15 '10 at 8:09