This depends on the crime. Qisas can be forgiven by those who are given the right to extract it, i.e. the family of the murdered, and that is well known:
كتب عليكم القصاص في القتلى ... فمن عفي له من أخيه شيء فاتباع بالمعروف وأداء إليه بإحسان ذلك تخفيف من ربكم ورحمة
Prescribed for you is legal retribution for those murdered ... But whoever overlooks from his brother anything, then there should be a suitable follow-up and payment to him with good conduct. This is an alleviation from your Lord and a mercy.
— Quran 2:178
فمن تصدق به فهو كفارة له
But whoever gives [up his right as] charity, it is an expiation for him.
— Quran 5:45
If this happens then the person will not be killed, however they will still be liable to pay diyyah and kaffarah and the state may give them a tazir.
As for Hudud, the violation of Allah's right is dominant in them and once the criminal has been apprehended and convicted it is obligatory to carry out the prescribed punishment.