Of whom is Hymeneus and Alexander: Alexander, the coppersmith, has done me much evil (2 Tim 4:14).
Then he mentions the punishment, when he says, whom I have delivered up to Satan, because he excommunicated them, so that the faithful might avoid them and not be contaminated. The excommunication inflicted by the Apostle was of such force, that the excommunicated person was immediately snatched by the Devil and suffered bodily harassment: in the name of our Lord Jesus Christ, you being gathered together, and my spirit, with the power of our Lord Jesus Christ, to deliver such a one to Satan, for... the destruction of the flesh, that the spirit may be saved (1 Cor 5:4).
But even now they are delivered over to be afflicted spiritually, because they lose the benefit of the Church's prayers, which are a great help against the Devil. And I have delivered them as God has delivered them up to a reprobate sense (Rom 1:28) by withdrawing his help and their affiliation with the Church and her prayers.
And he did this not from hatred, but from love and for their benefit: that the spirit may be saved (1 Cor 5:5); hence he says, that they may learn, through punishment, not to blaspheme. But there are three ways in which one learns to depart from sin: sometimes, from its punishment, when he is afflicted in body; sometimes, from the perplexity of being excommunicated; and sometimes, from the fact that the Church delivers him over to Satan, and he falls into public sins. As a result of this perplexity he is humbled and refrains even from hidden sins, which he formerly did not recognize he had.
Source: Commentary on 1 Timothy