I need to see if anyone’s written a tutorial or guide to Battle Badges, honestly; I barely pay attention to them myself. Anyway, answering your main questions:
You unlock a Battle Badge in much the same way as you unlock a Red Skill; once unlocked, the hero has it equipped permanently. As you promote the hero further up the Yellow ranks, you can also level up their Battle Badge with each rank which increases the stats on its benefits, but it costs more Megabits the higher the level.
You can also enhance a Battle Badge, which (except for the first badge you enhance) costs Megabits and a boatload of XP drinks; enhancing likewise increases the badge’s stats, and also unlocks a third benefit. If you level up an enhanced Battle Badge, you lose its enhancement and get back only a part of the Megabits you spent to enhance it, and none of the XP. The good news is that the cost of enhancing a Battle Badge depends on how many you currently have enhanced, so if you level up all your enhanced badges, you can re-enhance one (or enhance another one) for free. Use that ability wisely, and limit yourself to enhancing probably just one or two Battle Badges unless you’re a whale.
If anyone else has any more information or advice, please reply; as I say, I mostly ignore Battle Badges and so don’t claim to be an expert.