Actually before you are able to run mame, assume that you already have a game.
you will need to configure kxmame. It would be under settings, directories
What next is to add the directory where you have your roms. For me I just create a folder called mame.
Once you get your rom, in the directory, copy the whole directory to the mame folder. Or what ever name you add to kxmame. and copy the bios file to the roms directory