Flanking gives player characters and NPCs Advantage on attack rolls.  Flanking requires allies to be directly across from each other on either side of their foe.