The legend of fragging most often involved the killing of an unpopular or inept Commanding Officer. If a C.O. was incompetent, the belief was that fragging the officer was an extreme means to the ends of self preservation for the men serving under him. The nightmarish vision of fragging served as a warning to the junior officers to avoid earning the ire of the enlisted men being commanded through recklessness, cowardice, or lack of leadership.
Frag is a computer game term, used in first-person shooters. A frag is a killcount, that means one gets a frag if one kills ("frags") another player, but loses a frag for killing oneself (called a "suicide", even if unintentional), for example, by falling a long distance or discharging a rocket directly into a nearby wall.
One does not usually lose frags for being killed by another player. This leads to the game theoretical consequence that one should engage in combat with another player unless severely outmatched because the potential benefit (one frag) outweighs the potential harm (lost time for respawning and the opponent, who may not ranked first, gets a frag).
A computer hard drive is said to be fragged (short for "fragmented") if a large portion of its files are not contiguous (those files are also fragmented). See fragmentation.