Suppose a person is born Muslim but does not do the prayers and later he realized his mistakes and lead his life in good way. He knows that missing the prayers is a major sin and he wants to get rid of it. What should he do for that?
If he has committed some major sin like drinking alcohol or having narcotics then how do he get rid of punishment on the day of judgement?
Such cases are not uncommon but rather common in nowadays environment. What one has to do is to repent sincerely and earnestly for all his/her past mistakes/sins and solemnly commit not to repeat them. One should also feel a heartfelt remorse (as far as humanly possible). After this, one ought to be regular in his/her prayers and all other religious affairs of life---by keeping them in line with the Islamic teachings. Avoid being bogged down in Sectarian/School followings; which are not mandatory, but simply a matter of choice. One should pray as many as possible lost (Qaza) prayers. He/she may add them to the daily prayers or may offer them separately---according to one's convenience and satisfaction. There is, in fact, no (Qaza--replacement) for the sunnah or Nawafil. Qaza is only available for compulsory (Farad) prayers. One may, however, add some sunnah and nawafil to daily routine if one feels for it for his/her own additional satisfaction. Once one feels that he/she has approximately made up the lost praers he/she may continue with regular daily prayers. Thanks.
I am assuming that person has started praying after repenting.
First calculate approximately how many prayers you missed so how much you pray.
In Hanafi the person needs to pray sunnah prayers of the current prayers as well as kaza (so the person won't skip sunnah to pray kaza/old prayers), in Shafi, instead of sunnah, you better pray old prayers. I dont know the other two school of thoughts.
Then s/he should start paying off regularly as much as s/he can but it is important to do it regularly rather than praying 100 rakah a day and not praying for a month; slowly but regularly.
About the sins, s/he should repent for the sins, give sadaka if s/he can etc. Allah is er-Rahim and al-Gaffar.
Like any library, Islam Stack Exchange offers great information, but does not offer personalized advice or legal verdicts, and does not take the place of seeking such advice from your Mufti, Imam, or other trustworthy Counselor.