These documents -- either one document alone, or two in combination -- are meant to protect a person in two ways if and when he can't communicate:
The person can set out the specific types of healthcare -- usually including artificial life-prolonging care, artificially administered food and water, and comfort care -- that he does and doesn't want. In most states, this care can be specified if the person is either close to death from a terminal condition or considered permanently comatose. This clarifies things not only for family but also for medical providers, who are bound by law to follow the patient's wishes or find another provider who will agree to follow them.
The person can name someone to act on his behalf in making healthcare decisions when he can't do so himself. This designated agent, who's given legal power to act by the document, can make sure that the patient's wishes are carried out and can make any other healthcare decision that wasn't specified in the document.