A man, even if seriously ill or disabled in the exercise of his highest functions, is and always will be a man, and he will never become a "vegetable" or an "animal".
John Paul II
Euthanasia is defined as "an action or omission which of itself and by intention causes death, with the purpose of eliminating all suffering." 
Intentional euthanasia, the killing of handicapped, sick or dying persons is "morally unacceptable."  It is against the dignity of the person and "the respect due to... his Creator."  The Church teaches that God gave humans stewardship over life not ownership.
Medical care that is "burdensome, dangerous, extraordinary, or disproportionate to the expected outcome" can be legitimately discontinued or refused. In these instances death is not willed, instead "one's inability to impede it is merely accepted." 
When death is believed to be imminent, ordinary care must still be provided. "The use of painkillers to alleviate the sufferings of the dying, even at the risk of shortening their days, can be morally in conformity with human dignity if death is not willed as either an end or a means, but only foreseen and tolerated as inevitable." 
Is nutrition or hydration "extraordinary" medical care?
It is morally obligatory to provide patients with proper nutrition and hydration, even through artificial means, as long as he or she can assimilate it and it does not cause "significant discomfort."  If patients are not provided with this basic care the cause of their death will not be their illness or disability but "solely starvation and dehydration." 
What about people in a permanent vegetative state?
People who are severely disabled are still human beings, who "retain their human dignity in all its fullness." For this reason they still have the right to basic health care, such as nutrition, hydration, warmth, cleanliness, etc. 
1. Evangelium Vitae, 65
2. CCC, 2277
3. CCC, 2324
4. CCC, 2280
5. CCC, 2278
6. CCC, 2279
7. Responses to Certain Questions Concerning Artificial Nutrition and Hydration, Congregation for the Doctrine of the Faith, August 1, 2007
8. Commentary on Nutrition and Hydration, Congregation for the Doctrine of the Faith, August 1, 2007
9. Address of John Paul II to Participants in the International Congress on "Life-Sustaining Treatments and Vegetative State: Scientific Advances and Ethical Dilemmas" Saturday, 20 March 2004