In order to unlock swarm in Call of Duty Mobile, you must first complete the game's tutorial mission. Once you have done so, head to the main menu and select the 'Multiplayer' option. From here, select the 'Create Class' tab and scroll down to find the 'Swarm' class. Select this class and then choose your desired loadout. Finally, hit the 'Play' button to begin your match.