each battle has different rules, they are stored in something called a bitpack. for example, today the advent calendar features the sexmodit format, which accepts module file songs, and the bitpack is a collection of samples, meaning you can do whatever you want with them. sometimes its a text file telling you the rules though.
there's a lot of formats, including Famitracker and other stuffs. Some formats like allgear or liveplay allow for non 8bit music, while others demand some chiptuney vibes, like wildchip and fakebit.
this will help you! :)