Getting MAME figured out can be difficult. The problem is that there's two major MAME developement packages, the DOS based emulator, and the 32 bit Windows based one. The easiest one to use is by far the Windows based one especially if you're not well versed in DOS command line based control. Therefore, download MAME32 here...
http://mame32.classicgaming.gamespy.com/download.htm
After you download (and install) mame32, you'll notice a bunch of folders in the mame32 folder. The one you need to concern yourself with is the ROMS folder...
Then, locate the various ROMS you need to play the particular games you want to play. Those can be found at various ROM sites. Google 'pacman rom' or whatever game you're looking for (and the word rom), and you'll wind up at rom world, or romnation or whatever. Download the rom file(s) and save them into the \mame32\rom\ folder. You don't need to unzip them, just drop the zip file directly into the rom folder, and that's it. mame32 will unzip the zip file and extract the files when you go to play that particular game automatically.
After the roms are in the rom folder, run file called mame32FXpp.exe in the main mame folder. Mame32 will run, and you'll be able to set the filter on the left side pane. Click the one marked 'available' (2nd choice down), and it will filter out all the games you dont have, and only show the ones you do have. Double clicking the computer chip icon in the game pane to the right will execute that particular rom set, and after a few legal disclaimers, you should be playing pacman.
Bare in mind, there's no compiling needed here, just install the 32 bit version of Mame, throw roms in the rom folder, and play.