Defeat in detail is a
military concept that describes the worst way to lose a
battle. Just as there are several ways one can win (from a
total annihilation of the foe to a
Pyrrhic victory where one wins, but suffers
egregious losses to their own troops), there are also several ways one can lose. To name a few, one can lose the
field of battle to the enemy without major losses to their troops, one can be forced to
retreat at various levels of discipline from orderly to chaotic, one can break against a determined defense, or one can be defeated in detail.
When one is defeated in detail the foe succeeds in flanking and separating your troops into (often disorderly) groups unable to support one another, then defeating each group in succession until your army is destroyed or captured. This is not only something a larger force does to a smaller force. Gen. Stonewall Jackson's 1862 Shenandoah Valley campaign against Union forces is an excellent example of a smaller, well-led force breaking up a larger force and defeating it in detail.
Not all great losses involve a defeat in detail. For example, almost all of the soldiers in Pickett’s charge at Gettysburg were annihilated, and the Confederates were defeated in a very one-sided fight (with a few exceptions.) Yet they retained their cohesion, departed from the field of battle, and continued to engage the enemy in other campaigns.