What it means in practice
A DNR is the most specific advance-care order most patients ever sign. It says: if my heart stops or I stop breathing, do not attempt CPR (chest compressions, defibrillation, intubation). It does NOT say anything about other care — antibiotics for an infection, surgery for an unrelated condition, hospitalization, IV fluids, pain medication, oxygen. Many families assume a DNR is a broader "do not treat" order; it isn't. A patient with a DNR is still entitled to (and almost always receives) full medical treatment for everything other than resuscitation after a cardiac arrest.
DNR status is set up in the hospital chart at admission (often as part of the standard code-status discussion); for it to follow the patient home or to a nursing facility, the family needs a POLST or MOLST form, which is a portable physician-signed order. A DNR that exists only in one hospital's chart will not be honored by EMS responding to a 911 call from the patient's home — they will perform CPR by default unless they see a POLST/MOLST or an equivalent state-specific out-of-hospital DNR form.
The decision to sign a DNR rests with the patient (or their healthcare proxy if the patient lacks capacity). It is reversible at any time. Most clinicians recommend reviewing code status every hospitalization and at significant changes in health. A DNR is not "giving up" — patients with DNRs receive every other treatment indicated by their condition.