It depends what you're after.

Generally, wmv will provide the best compression to quality ratio, but because it's a proprietary microsoft format it's rarely used.

xvid (an avi codec) is the most common format used, and if you intend to distribute your movie, that's what you should use.

You might want to check out a program called VirtualDub if you have any need to convert between formats or do (very) basic editing