This is assuming windows, but works pretty similarly on osx/linux too:
1. rename your old c:\whatever\mame directory to c:\whatever\mame_old
2. download new mame files from http://mamedev.org/release.php
and install them in c:\whatever\mame
3. copy mame.ini, mess.ini, arcade.ini from the mame_old directory to mame directory
4. copy the cfg, nvram, sav directories from mame_old to mame
5. if you keep roms in mame\roms, move (don't copy, since it is likely quite large) the roms directory from mame_old to mame. If you keep your roms elsewhere and have the path already set up in mame.ini or other .inis, disregard this step
If everything worked ok, you should have a functional new mame installation in the mame directory.
Please note that some .ini options may have been added since whenever your .ini files were created, so you may be missing some options. In this case, things may work fine, but if you optionally want to run on a bleeding edge .ini file, you can back up your old .ini file and run mame.exe -cc to create a new one, open both the new mame.ini and the old one you backed up in your favorite text editor and migrate the relevant settings by hand from the old one to the new one.
JD points out to just run mame -cc, and the new options will be added to the existing ini file.