A do-not-resuscitate order is a medical order that is put on a person by their own choice, which would prohibit the resuscitation of the person in a medical emergency or procedure.
The choice of creating a DNR order is usually based on religious reasons, but is always left to the individual if they are adults and of sound mind to make a considered judgment on their behalf. A minor would be subject to the orders of their parent or guardian, who would determine the decision on their behalf.
Once a DNR order is placed on a person, if they experience a life-threatening illness or surgery, the doctors would only be able to medicate the person but not attempt any type of life-saving measure.
There have been court cases where the hospital caring for a terminally ill minor child takes court action against the parent or guardian of the child in order to provide medical care. This is done if the minor child could otherwise be saved by medical intervention but the guardian is prohibiting such care for religious reasons. In most cases of this nature, the court would rule on the side of the doctors, as it would be felt that in that specific instance, they had more knowledge to make an informed decision.
There are also cases where the hospital petitions the court to allow them to end medical care against the wishes of the guardian—in other words, gaining a court order for a DNR.