The iPhone can playback H.264 video at throughput rates up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Baseline Profile up to Level 3.0 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats. This means that videos in other formats -- including AVI -- must be converted in order to be properly synced to the device via iTunes and played.
Mac users have the wonderful freeware utility iSquint, which handily translates a variety of video formats to iPhone-compatible versions. Windows users have a variety of video conversion options as well, but a new tool is designed specifically and solely for converting video for the iPhone, making it easy to use and straightforward.
Dubbed "Movies2iPhone," the tool uses ffmpegx, a publicly licensed video conversion engine, and sports a drop-dead simply interface. After selecting the file to convert, users simply drag files to iTunes (or choose "Import" from the "File" menu in iTunes) and sync.
The developer says he plans to add a feature for automatically moving converted content to the iPhone.
For DVD-to-iPhone conversion via HandBrake, see this article.