All orders and judgments of a court must be complied with promptly. If a person is obstinate enough, they may be held in criminal contempt, which is a form of punishment. There is no contempt unless there is some sort of willful disregard, some degree of intentional wrongdoing. Falling asleep in court or being late for reasons not your own, for example, cannot be subject to contempt. Failure to pay a fine, for being unable or unemployed, is not a defense to contempt.
Direct contempt occurs in full view of open court or the legislative body.
It may be punished summarily, meaning there's no opportunity for a hearing about it. An example would be when Larry Flynt started shouting obscenities at his trial. The general rule is that there must be a personal attack on a trial judge in the form of a vicious slander or angry insult. A person so charged is entitled to a hearing on it before submitting to punishment for it. Criminal Law .