There are two documents that could be what you're talking about.
The traditional "Living Will" form is also sometimes called the declaration to physicians. It's a specific form that was designed by your state that allows you to specify what you would like done in several medical situations. In my state (Wisconsin) it tells your doctor whether you would like heroic measures used to save your life if you're in a terminal condition (Defined as death being immanent) and whether you want feeding tubes or life sustaining procedures if you're in a permanent vegetative state. A living will ONLY applies to the situations on the document -- you CANNOT personalise it. It's a series of check boxes.
The other document some people think of when they think of living wills is a Durable Power of Attorney for Health Care. This is a more broad document where you decide on someone and give them power to make medical decisions for you if you're unable to make them yourself. It can pertain to any situations where you can't make your own decisions, not just terminal state and being a vegetable.
So, for instance, if you were in a car accident and knocked on the head but expected to recover, a Power of Attorney would give someone the authority to accept treatment on your behalf, for instance if you needed a broken bone set or something, until you were well enough to make your own decisions again, where as a living will WOULDN'T do that, because it's just between you and your doctor and only comes into play if you're terminal or a vegetable. Many people choose to just do a Power of Attorney rather than a living will, but if you have strong feelings about life support I would reccomend doing both.
You can also customize a power of attorney for health care to cover health care issues that you feel strongly about -- If you under no circumstances would want chemotherapy, for instance, or if you're of a religious denomination that is against the use of blood products those are the sorts of things that belong in a power of attorney.
A living will or a power of attorney isn't something that you write out like you would a normal will; there are forms for your specific state that you can find online at www.partnershipforcaring.org
, and I'm sure other places as well. You're attorney can help you fill the forms out if you have questions, and often hospital or clinic social workers can help as well and will do so free of charge.
These documents are so, so, so important and I'm always really excited to see people getting them in order! Good luck working on them!