Here's how to get it:
1. Beat the main story: Finish the game by defeating the main villain and rescuing the other Pokémon.
2. Talk to the Wigglytuff: After completing the main story, head back to Wigglytuff's house and speak with her. She'll tell you about a new threat – Groudon.
3. Rescue Groudon: You'll need to venture into the newly unlocked post-game dungeon, which is full of difficult challenges.
4. Fly to your Rescue Team: Once you've rescued Groudon, it will join your Rescue Team. Groudon comes equipped with the HM Fly, allowing your team to fly to different locations.
Note: You can only use Fly once you have rescued Groudon, and it can only be used in areas that have been unlocked by completing the post-game story.