To get the flag to spawn, you or someone from the opposite team needs to get one kill. This will cause the flag to spawn in on the enemies body, from which you can then pick it up by holding (X). From there, simply click in the right thumb stick to swing the flag and hopefully kill any approaching enemies.
Flag kills are cumulative and this does not have to be done in one game.
Goodluck and happy hunting!