You should use mame32.. It is much easier for you.
Anyway, for your question:
1. On XP select start, Run... and type CMD at the prompt.
2. Now change directory to where you have the two files by typing CD C:\<insert folder name here> e.g. C:\Mame
3. If you have downloaded .. for example: Puckman from the Installing Games page then all you need to do is type
dmame puckman -soundcard 0
Maybe it's more complicated than you think. You should use Mame32.