It is generally not understood. Catholic doctrine allows capital punishment. Here according to Avery Cardinal Dulles is the gist of it:
The doctrine remains what it has been: that the State, in principle, has the right to impose the death penalty on persons convicted of very serious crimes.
[. . .]
1) The purpose of punishment in secular courts is fourfold: the rehabilitation of the criminal, the protection of society from the criminal, the deterrence of other potential criminals, and retributive justice.
2) Just retribution, which seeks to establish the right order of things, should not be confused with vindictiveness, which is reprehensible.
3) Punishment may and should be administered with respect and love for the person punished.
4) The person who does evil may deserve death. According to the biblical accounts, God sometimes administers the penalty himself and sometimes directs others to do so.
5) Individuals and private groups may not take it upon themselves to inflict death as a penalty.
6) The State has the right, in principle, to inflict capital punishment in cases where there is no doubt about the gravity of the offense and the guilt of the accused.
7) The death penalty should not be imposed if the purposes of punishment can be equally well or better achieved by bloodless means, such as imprisonment.
8) The sentence of death may be improper if it has serious negative effects on society, such as miscarriages of justice, the increase of vindictiveness, or disrespect for the value of innocent human life.
9) Persons who specially represent the Church, such as clergy and religious, in view of their specific vocation, should abstain from pronouncing or executing the sentence of death.
10) Catholics, in seeking to form their judgment as to whether the death penalty is to be supported as a general policy, or in a given situation, should be attentive to the guidance of the pope and the bishops. Current Catholic teaching should be understood, as I have sought to understand it, in continuity with Scripture and tradition.