Allah, the Wise, has said:
وَ أََنِ اسْـتَغْفِرُوا رَبَّکُمْ ثُمَّ تُوْبُوا إِلَيْهِ
"And that you ask forgiveness of your Lord, then turn to Him." 
Imam Sadiq (as) said:
إِِذَا تَابَ الْعَبْدُ تَوْبَةً نَصُوحاً أََحَبَّهُ اللٌّهُ فَسَتَرَ عَلَيْهِ.
"If a servant repents sincerely, Allah loves him (and) so conceals his sins." 
Repentance is the cord of Allah which those repenting must necessarily grasp; they need to clean their interior of their sins and testify against themselves before their Lord.
They should be repentant from the depths of their hearts with regards to their past misdeeds, and fearful with regards to the remaining period of their lives. The auliya (friends) of Allah repent for the (inappropriate) thoughts that may have passed through their minds, while the special ones repent for engaging themselves in anything other than Allah, even as the general masses repent for the sins committed by them.
It is vital that, in order to make amends for past (mis)deeds and refrain from committing sins in the future, the person repenting should not look upon any sin as being trivial and insignificant, but should always experience regret over his past lapses, keep his soul away from various kinds of lust and guide it towards struggle (against lust) and worship.
1 – The Inventor of A Religion and Repentance
Imam Sadiq (as) related: "In ancient times there lived a man who sought to earn his livelihood and procure great wealth by lawful means but was unsuccessful. He then strived to achieve his objectives by unlawful means but once again failed.
Satan appeared before him and said to him: "You tried to acquire great wealth by lawful as well as unlawful means but were unsuccessful. Do you want me to show you a way by which you would not only become wealthy but you would also attract numerous followers?"
The man expressed his willingness to know how he could get rich.
"Concoct a religion and invite people to follow it," suggested Satan.
The man fabricated a religion and soon, he had a lot of followers through whom he became rich.
One day he realized that he had made a mistake by leading numerous people astray so he resolved to inform the people of the falsity of his religion and the error of his ways. But however hard he stressed and emphasized, the people simply refused to accept his word.
"Your previous views were correct; have you become sceptical of your own religion now?" they asked. When he heard these words, he got some shackles and chained himself. He pledged that he would not unchain himself until Allah accepted his repentance.
Allah revealed to the Prophet of the time to convey the following message to the person: "By My Honour! Even if you weep and supplicate to the extent that every ligament of your body falls apart, I shall never accept your prayers, till you inform those people who have died after having been led astray by you of the reality and they turn back from your religion."
2 – The Employee of Bani Umayyah
Ali Ibn Hamzah relates: "I had a young friend who worked as a scribe within the Bani Umayyah administration. Once, he asked me to arrange an appointment for him to meet Imam Sadiq (as). I sought permission from the Imam (as) and he agreed to meet the man. At the appointed time, my friend and I arrived in the Imam's (as) presence.
My friend greeted the Imam (as), sat down and said: "May I be made your ransom! I had occupied a position in the Ministry of Treasury of the Bani Umayyah and have managed to acquire great wealth, although I have committed some crimes too!"
"If the Bani Umayyah did not have people like you to collect taxes for them and accompany them in their battles, they could not have usurped our rights," said Imam Sadiq (as).
"Does there exist a way for my salvation?" pleaded the youth.
The Imam (as) asked: "If I tell you, would you act upon it?"
The youth replied in the affirmative.
"From the possessions that remain with you, return those whose owners are known to you, and as for those things for which the owners are unknown to you, give them off in charity on behalf of their owners. In exchange for this act, I shall guarantee you Paradise!" said Imam (as).
Lowering his head, the youth responded after a long deliberation: "May I be made your ransom! I shall do as instructed by you."
Ali Ibn Hamzah says: We got up and proceeded towards Kufah. There, my friend divested himself of all his possessions - even his clothes - either returning them to their owners or giving them to charity. I collected some money from my friends to purchase some clothes for him and I used to send him money for his expenses.
A few months after this incident, he fell ill and we used to visit him regularly during his sickness. One day, when I paid him a visit, I found him on the verge of dying. Opening his eyes he said to me: "O' Ali! The Imam (as) has fulfilled his promise." Then he departed from the world. We performed the ablutions, shrouded his body and finally buried him.
Some time later, I visited the Imam (as). As soon as his eyes fell upon me, he said: "O' Ali! I have fulfilled my promise to your friend."
"May I be made your ransom! It is as you say. He too mentioned it (the guarantee of Paradise) to me before his death," I said."
3 – Return before Death
Muaawiyah Ibn Wahab narrates: "When we set out for Makkah, there was an old man with us who used to engage himself in acts of worship, but did not profess the Shiaite faith. This old man was accompanied by his nephew, who was of the Shiaites.
During the journey, the old man fell sick. I said to his nephew: "Why don't you inform him of the true faith; it is possible that Allah may take him away from the world in the state of true faith and Wilayah."
However, the other people advised him to leave the man alone and to let him die upon his own faith. However his nephew did not heed their advice. He went to his uncle and said: "O' Uncle! After the death of the Noble Prophet (sa), the people, with the exception of a handful who had adhered to Amirul Mo'minin (as), became apostates despite the fact that the Caliphate (of Amirul Mo'minin (as)) had already been stipulated by the Noble Prophet (sa)."
Hearing these words, the old man heaved a sigh and said, "I accept this faith," and then breathed his last."
Muaawiyah Ibn Wahab relates: "We entered Madinah and arrived before Imam Sadiq (as). Ali Ibn Sari, one of our companions, related the incident of the old man's repentance and his acceptance of Imamate just before his death, to the Imam (as) who said: "He is of the inmates of Paradise."
Ali Ibn Sari remarked in astonishment: "The old man did not know anything about our faith and was totally ignorant of its laws and rulings; it was only when his soul was about to separate from his body that he accepted this faith!"
The Imam (as) explained: "What (more) do you want of him? By Allah! He has (already) entered Paradise."
4 – Abu Lubabah
Abu Lubabah was one of the distinguished companions of the Noble Prophet (sa) and had participated in the battle of Uhud and the conquest of Makkah. One of the sensitive aspects of his life was the incident of his repentance.
When the tribe of Bani Quraidhah violated their covenant with the Noble Prophet (sa), the Noble Prophet (sa) initiated a military expedition against them and besieged their fort. Some persons from the tribe of Aus approached him and requested: "Just as you had handed over the fate of the tribe of Bani Qainaqaaa to be decided by the tribe of Khazraj, leave it upon us to decide the fate of the tribe of Bani Quraidhah."
"Will you be satisfied if I were to appoint one person from your tribe to rule in the matter?" the Noble Prophet (sa) asked.
They agreed. The Noble Prophet (sa) suggested Saad Ibn Muaadh, but the Bani Quraidhah refused to accept him. They told him to send Abu Lubabah to them so that they could confer with him. The Noble Prophet (sa) assigned Abu Lubabah, who had his house, property and family in the fort of Bani Quraidhah, the task of conducting consultations with them.
As soon as Abu Lubabah entered the fort, men and women, old and young, surrounded him and began lamenting and complaining to him (over the state of affairs) with the intention of attracting his pity and compassion. Then they asked: "Should we submit before the rule of the Noble Prophet (sa)?"
"You could do that," he replied, making a gesture (by pointing to his neck) to indicate that submission was equivalent to death.
He quickly realized that by performing this act, he had been unfaithful and disloyal to the Noble Prophet (sa). It was on this occasion that the following verse was revealed: "O you who believe! Be not unfaithful to Allah and the Messenger, nor be unfaithful to your trusts while you know. Know that your property and your children are a temptation, and that Allah is He with Whom there is a mighty reward."
Overcome with shame, he came out of the fort and proceeded straight towards the mosque of Madinah and, tying himself to one of its pillars in the mosque, called out: "None should untie me till Allah accepts my repentance."
He remained in that state for ten to fifteen days, allowing himself to be untied only for prayers or to go to the washroom.
"If Abu Lubabah had come to me, I would have sought forgiveness for him but since he himself awaits Allah's forgiveness, leave him alone till Allah forgives him," the Noble Prophet (sa) commented when he came to know what Abu Lababah had done.
Umme Salamah states: "One day, at dawn, I saw the Noble Prophet (sa) happy and smiling. May Allah always keep you smiling! What is the reason for it?" I asked him.
"Jibra`il has informed me that Abu Lubabah's repentance has been accepted," he said.
"Do I have your permission to inform him of the good news?" I asked.
"You may if you wish," he answered. From inside the room I called out: "Glad tidings, O' Abu Lubabah! Allah has accepted your repentance."
The people rushed forward to untie him but he ordered: "I place you under the oath of Allah that none, except the Noble Prophet (sa), should untie me."
When the Noble Prophet (sa) arrived in the mosque for the morning prayers, he untied Abu Lubabah from the pillar which stands even today, in the Mosque of the Noble Prophet (sa) and is popularly known as the 'Pillar of Repentance' or the 'Pillar of Abu Lubabah'.
5 – Buhlul, the Gravedigger
Muaadh Ibn Jabal was in tears when he arrived in the presence of the Noble Prophet (sa) and greeted him. The Noble Prophet (sa) replied to his greeting and asked: "What makes you cry?"
"At the door of the mosque, there is a good-looking youth who weeps as intensely as a mother whose young son has died, and he wishes to meet you," replied Muaadh.
The Noble Prophet (sa) agreed to meet him.
The youth entered and greeted the Noble Prophet (sa) who returned his greeting and enquired: "Why do you weep?"
"Why should I not weep? I have committed sins which Allah will never forgive and He is bound to hurl me into Hell," said the youth.
"Have you associated someone with Allah?"
"Have you killed anybody?"
"Even if your sins are of the magnitude of mountains, Allah shall forgive them," said the Noble Prophet (sa).
"My sins are greater than the mountains," the youth explained.
"Are your sins in the magnitude of the seven earths, the seas, the sands, the trees, all that lies on the earth, in the skies, the stars, the Throne and the Chair?" asked the Noble Prophet (sa)).
"My sins are greater than all of these things."
"Woe unto you! Are your sins greater than your Lord?"
The youth lowered his head and replied, "Allah is devoid of all blemishes; it is my Lord, who is greater."
"Would you not relate one of your sins to me?" enquired the Noble Prophet (sa).
"Why not?" responded the youth, whose name was Buhul. "For seven years I used to dig up the graves of the dead, take out their shrouds and sell them. One night, a maiden from amongst the Ansar (The Helpers) died and was buried in the cemetery. When I dug open her grave to remove the shroud from her body, the Satan tempted me and I committed a grave sin. As I was turning back, the body called out to me: "O' Youth! Don't you fear the Ruler of the Day of Judgment? Woe unto you of the fire of the Day of Judgment!"
Having narrated this, the youth wanted to know what he should do.
"O' Sinner! Stay away from me for I fear that I might burn in your fire too!" cried out the Noble Prophet (sa).
The youth left, heading straight towards the mountains. He tied his hands to his neck and became engrossed in worship, supplications and seeking forgiveness.
For forty days, he wept day and night to the extent that even the wild beasts were affected by his weeping. After forty days he asked Allah to either punish him by means of fire or forgive him, so that he might not have to face humiliation on the Day of Judgment.
Allah revealed the following verse, which refers to the forgiveness of Buhul: "And those who, when they commit an indecency or do injustices to their souls, remember Allah and ask forgiveness for their faults… and who forgives the faults but Allah."
The Noble Prophet (sa) recited this verse with a smiling face and then asked: "Who can take me to that youth?"
Muaadh agreed to take him. Accompanied by Muaadh, the Noble Prophet (sa) went to the place where the youth was. He saw him standing between two boulders, hands tied to his neck and engaged in supplication. His face had become dark due to the scorching sun and all his eyelashes had fallen off due to the intense weeping. Wild beasts had gathered around him while the birds circled over his head, all of them weeping over his distressed and pitiable state.
The Noble Prophet (sa) advanced towards him, untied his hands and cleared the soil from the top of his head.
"O' Buhul! Glad tidings for you; you have been liberated by Allah from the fire (of Hell)," he said.
Then, turning to his companions, he said, "This is how you should make amends for your sins."
 Noble Qur'an, Surat Hud (11), Verse 3
 Jamea al-Saaadat, Volume 3, Page 65
 Tadhkeratul Haqaiq, Page 75
 Pand-e-Tarikh, Volume 4, Page 251; Biharul Anwar, Volume 2, Page 277
 Shanidani-ha-e-Tarikh, Page 55; Mahajjatul Baiza, Volume 3, Page 254
 Khazinatul Jawahir, Page 312; Rauzatul Anwar of Sabzwari
 Noble Qur'an, Suratul Anfal (8), Verse 27-28 يا أَيُّهَا الَّذِينَ آمَنُوا لا تَخُونُوا اللَّهَ وَ الرَّسُولَ وَ تَخُونُوا أَماناتِكُمْ وَ أَنْتُمْ تَعْلَمُونَ وَ اعْلَمُوا اَنَّماَ اَموَالَكُم وَ اَولاَدَكُم فِتنَةٌ وَ انَّ اللهَ عِندَهُ اَجر عَظِيم
 Paighambar Wa Yaran, Volume 1, Page 129; Majma' al-Bayan, under the discussion regarding verse 102 of the chapter al-Taubah: وَ آخَرُونَ اعْتَرَفُوا بِذُنُوبِهِمْ خَلَطُوا عَمَلاً صالِحاً وَ آخَرَ سَيِّئاً عَسَى اللَّهُ أَنْ يَتُوبَ عَلَيْهِمْ إِنَّ اللَّهَ غَفُورٌ رَحِيمٌ
 Holy Qur'an, Surah ھle aImran (3), Verse 135: وَ الَّذِينَ إِذا فَعَلُوا فاحِشَةً أَوْ ظَلَمُوا أَنْفُسَهُمْ ذَكَرُوا اللَّهَ فَاسْتَغْفَرُوا لِذُنُوبِهِمْ وَ مَنْ يَغْفِرُ الذُّنُوبَ إِلاَّ اللَّهُ
 Risalah Liqaullah, Page 62; Majalis as-Saduq