You can't change the default player (which only plays MP4), but you can install a variety of 3rd party video players that can play locally stored videos or stream videos that use other codecs.
I use
AVPlayerHD to play videos stored on the iPad and
AirPlayer to play videos stored elsewhere that I stream via DLNA. Both support Xvid, Divx, MKV, etc.
As mentioned, there's also
VLC.