Suppose a judge orders you to do something that you find very hard to do - say bring your five year old to her father for a weekend and you really really don't think he's a good dad. Are you allowed to ignore the order because you think it's just wrong?
Orders of courts, no matter how much you think they are wrong, must be obeyed fully until they are set aside, stayed or varied. You may have a right to appeal or seek to vary or to stay the order but until and unless the order is changed it must be obeyed.
The rule that orders are to be obeyed is the basis of our legal system -- it's a mandatory process. A Canadian judge held the the requirement that orders be followed is not to make judges feel good:
"Rather it is to protect the public confidence in the administration of justice without which the standards of conduct of all those who may have business before the courts are likely to be weakened, if not destroyed, with the result that the public, rather than having recourse to the courts for the settlement of their disputes, will seek other means, legal or illegal. There is an essential public interest in the upholding of the authority of the courts and of the law."
Court orders are very serious things and even if you think the order is totally wrong you have to obey it.
Ignoring a court order is a criminal offence and opens you to being found in contempt.
Contempt of court generally refers to conduct that defies, disrespects or insults the authority or dignity of a court. Breaching a court order amounts to contempt although other things, say insulting a judge in court, are also contempt.
Contempt is taken very seriously by the court and is rarely used.
For someone to be found in contempt of a a court order there must be proof, beyond reasonable doubt, of a clear court order that was knowing breached. Contempt is seldom used for trivial breaches -- say the court ordered an affidavit to be delivered by noon and it was delivered by 3:00 pm. That said, even "trivial" breaches are a problem and should be avoided.
An order is in effect as soon as the judge releases a decision. In civil cases a formal order is prepared to reflect the judge's decision and that can come a week or more after the ruling -- but the order is binding and must be followed from the moment the judges releases the decision even if there is no formal order.
Besides contempt, failure to follow a court order is a criminal offence. The Criminal Code provides for a term of imprisonment for up to two years for breaching an order -- while such sentences are rare it is very common for people to get jail for a breach of a court order and such sentences are often several weeks or months depending on what the facts of the case are.
Bottom line - if a court orders you to do something you better do it.