A flank is the side of a military formation. A force that is advancing or facing forward is well protected at the front but far more exposed along its edges, so an attack from the side is harder to answer — the unit has to turn and reorganise under fire before it can defend itself properly.
That is why "flank them" is such a common instruction: hitting the side of an enemy line usually costs the attacker less and achieves more than a straight frontal push.