A "Gag Order" is usually a Judge's order directed at the attorneys, witnesses, and parties before the court not to publicly discuss the facts of a case. This is typically done in criminal cases of particular notoriety in order to assure the defendant receives a fair trial. A gag order may also bind and gag or restrain an unruly defendant in order to preserve the decorum of court proceedings. The modern usage of "Gag Order" is derived from the occasional historical use of a court order to literally gag an unruly criminal defendant by putting a cloth in his mouth to prevent him from disrupting court proceedings.
Example: In the 2004 Michael Jackson child molestation trial, the California Supreme Court upheld a gag order prohibiting Jackson, his accusers, and the attorneys in the case from publicly commenting on the case, except through statements approved in advance by the trial judge.