The most common reason this happens is because your computer is missing the necessary video decompressor (the "dec" part of a codec). A movie file that uses a codec that is not part of QuickTime, for example, would cause this symptom. In many cases QuickTime won't be able to decompress the video, but can decompress the sound because the right sound codec is installed.
The solution is to find out which codec the movie file uses, then install it on your Mac (if a Mac OS version of the codec exists). If you can't find a codec to install, a third-party player application may include a codec that only it can use. Try a third-party player to see if it can play the movie.
This can also happen if you encode video with QuickTime 7 (included with Mac OS X 10.4) using the H.264 codec and try to play that back on a computer with QuickTime 6.5.2 or earlier. The H.264 codec is only available with QuickTime 7 or later. The latest version of QuickTime can be downloaded from the QuickTime website.
Note: If you have purchased a video from the iTunes Store, any computer playing back the video requires QuickTime 7.1.3 or later and you must authorize that computer for your iTunes account.
In Mac OS 9 or earlier, this symptom could also occur if a limited amount of memory is assigned to MoviePlayer, QuickTime Player, or your QuickTime playback software. Increase the available memory to the movie playing software.