There is a code of law in every religion which are commandments of God, which He gave by prophets. In christianity for example there are canons of the fathers of Church which define number of years for excomulgation from Church for each sin. The sense of this is epitimia and ban for Holly communion.
But sacred sense of each sin is little bit different. If a person commits sin, satan force obtains access to body of the sinner and fallen spirits can disassemble you. They can steal mind, belly, heart. But if a sinner stops committing sins and bears several years without vice, body is transferred automaticly to invisible level. There stays only vision of body to all.
For example, if a person does fornication, he looses defence for 7 years, if fornication happens to married man of with married man, fallen spirits get access for 13 years.
Clever way is following commandments! Then you will be healthy and pure.