Ok, so first you need to have the Kaillera server.
You can get it here:
It will also show you the list of most popular games at the moment.
Once you have downloaded the server place the plugin into your mame folder.
(Unzip the contents and add them to the main MAME folder.)
I advise you use Mame32k0.64en, it's the most used for online gaming.
Then fire up mame exe, and on the menu select file>network game.
A list of servers will appear and show you the stats.
Place a nick name at the bottom left, and select a server you wish to play on.
Then click connect at the bottom right of the panel.
Once you are in the lobby, you can choose to join a game.
(Make sure you have the game and the version before you do, or it will not sync.)
Or you can create a new one.
(A new game will bring up the list of games you have available)
Then just wait for another player, and once they are in, select start game and off you go.
...and there you have it.
The rest is basically self explanatory.