A Do Not Resuscitate (DNR) order is a specific medical order, signed by a doctor, instructing that CPR not be attempted if your heart stops or you stop breathing. It's related to, but distinct from, your living will.
How it differs from a living will
A living will documents your wishes broadly and is used to guide decisions. A DNR is an actual medical order, immediately actionable by EMS and hospital staff, and typically needs to be signed by your physician to be valid and recognized in an emergency.
Getting one in place
Discuss it directly with your doctor if it reflects your wishes — many states also offer a portable version (sometimes called POLST or MOLST) specifically designed to be recognized by EMS outside a hospital setting.