The human flag is arguably the most visually impressive bodyweight feat of strength anyone's ever come up with. Any time someone does a human flag, it inevitably attracts attention.
It takes considerable strength and lots of practice to do the human flag. You have to be incredibly strong, but you also must work specifically towards this skill.
It requires a strong back, shoulders and core.
You can start training by tucking your legs or by just doing the movement on the ground.