Education is probably the most widely successful effort, but really there's no clear answer to this. Different methods have different rates of success depending on the crime. Generally, efforts at reducing recidivism are expensive and most societies are unwilling to allocate too many resources towards the benefit of criminals. In some cases, psychotherapy or counseling will do the trick. Sometimes medication is required. Ideally, the punishment itself will be enough of a deterrent to stop repeat offenders.