Grab the song you want to use, and convert it to either MP3 or OGG, using a music converter, such as Media Human Converter, or Easy MP3 Converter. I advise you to use a song that is 10 minutes long, at least, because Win-Mugen's repeat function is half screwed up, so there's a 50-50 chance that songs wont repeat on yours. Alternatively, use Audacity and edit your song to extend it to 10 minutes or more.
Go to your data folder and open the system.def notepad you are currently using.
Find this section:
Ok, now place the music you want to use in the Snd folder located in the data folder. Data/Snd
If you don't have a Snd folder, then create one.
Go to the quoted command line, eg Select.bgm and change the name of the song to your own, always following the correct path to the directory, where the song is located, and don't forget to add the extension to the file format.
For example, if your song is an OGG file, then add the OGG file extension.
Remember to keep the song's name as short as possible, and it must not have any spaces.
Say you want to change the main menu music, and you want to use King of Fighter's Maximum Impact main menu theme.
Follow the example bellow.
Keep the loop always as 1 to repeat the music, otherwise it will stop playing. Though it not always works, so use a long song for it.
Save...and that's about it.
Remember to always type .mp3 or .OGG after the song name, for it to take effect.
If the mp3 doesn´t work, then use OGG.
The quality isn't as good, but should work better.