Here is what the Catechism of the Catholic Church says about euthanasia (2276-2279):

"Those whose lives are diminished or weakened deserve special respect. Sick or handicapped persons should be helped to lead lives as normal as possible. 

"Whatever its motives and means, direct euthanasia consists in putting an end to the lives of handicapped, sick, or dying persons. It is morally unacceptable. 

"Thus an act or omission which, of itself or by intention, causes death in order to eliminate suffering constitutes a murder gravely contrary to the dignity of the human person and to the respect due to the living God, his Creator. The error of judgment into which one can fall in good faith does not change the nature of this murderous act, which must always be forbidden and excluded. 

"Discontinuing medical procedures that are burdensome, dangerous, extraordinary, or disproportionate to the expected outcome can be legitimate; it is the refusal of'over-zealous'treatment. Here one does not will to cause death; one's inability to impede it is merely accepted. The decisions should be made by the patient if he is competent and able or, if not, by those legally entitled to act for the patient, whose reasonable will and legitimate interests must always be respected. 

"Even if death is thought imminent, the ordinary care owed to a sick person cannot be legitimately interrupted. 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. Palliative care is a special form of disinterested charity. As such it should be encouraged." 

In March 2004, Pope John Paul II gave an address to a large group of physicians. Here is an excerpt:

"I should like particularly to underline how the administration of water and food, even when provided by artificial means, always represents a natural means of preserving life, not a medical act. Its use, furthermore, should be considered, in principle, ordinary and proportionate, and as such morally obligatory, insofar as and until it is seen to have attained its proper finality, which in the present case consists in providing nourishment to the patient and alleviation of his suffering.

"The obligation to provide the'normal care due to the sick in such cases'includes, in fact, the use of nutrition and hydration. The evaluation of probabilities, founded on waning hopes for recovery when the vegetative state is prolonged beyond a year, cannot ethically justify the cessation or interruption of minimal care for the patient, including nutrition and hydration. Death by starvation or dehydration is, in fact, the only possible outcome as a result of their withdrawal. In this sense, it ends up becoming, if done knowingly and willingly, true and proper euthanasia by omission.

"In this regard, I recall what I wrote in the Encyclical Evangelium Vitae making it clear that "by euthanasia in the true and proper sense must be understood an action or omission which by its very nature and intention brings about death, with the purpose of eliminating all pain"; such an act is always "a serious violation of the law of God, since it is the deliberate and morally unacceptable killing of a human person" (n. 65). 

(Pope John Paul II, to the Congress on Life-Sustaining Treatments and Vegetative State, March 20, 2004.)