If someone commits a sin, and right after committing that sin he repents to Allah with Tobah, will that person be forgiven if this process happens repeatedly?
Allah (swt) states in the Holy Quran that He will forgive all the sins:
Surah Zumar(39) verse (59)
قُلْ يَا عِبَادِيَ الَّذِينَ أَسْرَفُوا عَلَىٰ أَنفُسِهِمْ لَا تَقْنَطُوا مِن رَّحْمَةِ اللَّـهِ ۚ إِنَّ اللَّـهَ يَغْفِرُ الذُّنُوبَ جَمِيعًا ۚ إِنَّهُ هُوَ الْغَفُورُ الرَّحِيمُ
Say [that Allah declares,] ‘O My servants who have committed excesses against their own souls, do not despair of the mercy of Allah. Indeed Allah will forgive all sins. Indeed, He is the All-forgiving, the All-merciful.
But we have to bear in mind that repentance has some conditions:
Tawbah is not accepted from one who merely declares, “I repent.” There are a number of conditions that must be fulfilled before the acceptance of Tawbah. These are mentioned below in the following hadith:
• It is narrated that someone said: Astaghfirullah (I seek God's forgiveness) before Imam ‘Ali (a). He said to him. "May your mother mourn for you! Do you know what istighfar is? Verily istighfar is a degree of the 'illiyyun (people of high station) and it is a word that means six things. First is remorse over the past. Second, the resolution not to return to it ever. Third, to return to creatures their (formerly usurped) rights so that you meet God Almighty in a state of purity in which no one has any claim against you. Fourth, that you fulfil every duty that you neglected in order to satisfy your obligation in respect to it. Fifth, that you attend to the flesh of your body that has grown on unlawful nourishment so that it melts away as a result of grief and mourning and your skin adheres to your bones, after which new flesh grows in its place. Sixth, that you make your body taste the pain of obedience in the same way as it earlier tasted the pleasure of sins. When you have done these things then say Astaghfirullah! [Nahj al‑Balagha, saying # 417]
This noble tradition mentions two prerequisites for Tawbah (remorse and resolution), two important conditions for its acceptance (returning the rights of creatures and of the Creator), and finally two points for the perfection of repentance.
read more here: