A restraining order, more properly known as an injunction, is an order from the court that prevents one party from doing something. Injunctions can range anywhere from preventing a parent from moving a child out of state, to preventing one party from contacting another.
When an injunction is given it has the force of law behind it. If the person served with an injunction does not follow its order, they can be held in contempt, arrested and charged with violation of an injunction, contempt of court, or a variety of charges based on the violation.
Injunctions are most commonly used in family law situations. If someone has been the victim of domestic violence, stalking or harassment, then having an injunction granted against the abuser in recommended.
Injunctions are also used when dealing with parental rights. One might be filed to require a parent to keep the children within the state, or to prevent a parent from taking the children outside a particular jurisdiction.