Depends what you want to play them on.
Aside from speciality stuff like DPG, PSP videos for official firmware and ipods it comes down to a few things.
If for others with a DVD player I normally use something like DVDshrink/rejig to cut it down to size and kill the menus or if I have to do a lot of work I will recode the streams and possibly audio.
Other times I will just kill some of the extras hardcoded trailers and the like.
Search for vobedit, vobblanker, ifoedit and PCGedit. Some of the tools can be a bit complex (PCGedit especially) at first but once you are familiar chances are you will wonder why you did not already.
If you want to edit the subtitles in video without having to mess around too much DVDsubedit:
http://www.free-codecs.com/DVDSubEdit_download.htm
I recently installed xbmc on my xbox so that has made life far nicer (my gaming rig is a bit noisy for right by the TV and it is a pain to get it there) but unfortunately it does not play well with H264 video but it does get on with MKV well enough so I normally do that. I like MKV for the names of streams, chapters, support of pretty much all formats, multiple streams as standard unlike stock AVI (I do not like hacks to the format so I tend to replace it).
See below for how I do MKV but ignore the h264 stuff and replace with whatever else if you need it.
If for my PC I use MKV with H264 and normally just srt subs as I am too lazy for ASS/SSA sub making most of the time (if it is a really nice anime then that is different).
Here I normally use
DGindex/DGdecode serve it with avisynth (and normally do any edits there) to megui.
I can go straight to MKV there but I normally make raw streams and then use MKVmerge from the MKVtoolnix packages as it is mare more adaptable and I can easily add names and whatnot.
Audio is normally HE-AAC from nero's AAC tool (it is freeware) or I might leave it as ac3 from the DVD (perhaps dropping the channels to stereo or 2.1).
Edit: xvid vs divx. They both do the same standard (for now anyway, both have said things about moving to other formats). Quality and speed wise you will be hard pushed to tell them apart. xvid has a few more options for standalone video and divx has a few more tools as well as the divx container (a tweaked avi file: so much so that renaming to .avi will allow stuff that does not support it to play it) but pretty much everything on the freeware front is geared towards xvid.