Shaykh Uthaymīn (rahimahullaah) explains al-Istigfār:
The author (Imām an-Nawawi (rahimahullāh)) completed his book (Riyādh as-Sālihīn) – this tremendously beneficial book which Muslims in all corners of the world benefit from (the layperson and the students of knowledge) – with istigfār.
Al-istigfār: means to seek forgiveness, and there is not a single person except that he errs, as the Prophet (sallallāhu alaihi wa salam) said,
“All of mankind err, and the best of those who err are those who repent.” (1)
And mistakes which occur from mankind, are either by way of shortcomings in the performance of an obligation or by the committing of a prohibition.
Mankind is not free from falling into these errors, however the cure of sins and shortcomings is al-istigfār (Alhamdulilāh).
And in an athar, it’s narrated that Shaytān said,
“I have destroyed the people with sins, and I have been destroyed by La Ilāha illa Allāh”
Seeking forgiveness is a means of (gaining) forgiveness, due to this, Allāh commanded with istigfār in many verses of the Qurān.
فَاعْلَمْ أَنَّهُ لَا إِلَٰهَ إِلَّا اللَّهُ وَاسْتَغْفِرْ لِذَنبِكَ وَلِلْمُؤْمِنِينَ وَالْمُؤْمِنَاتِ
So know (O Muhammad SAW) that La ilaha ill-Allah (none has the right to be worshipped but Allah), and ask forgiveness for your sin, and also for (the sin of) believing men and believing women. (Muhammad: 19)
So Allāh (The Most High) commanded his prophet (sallallāhu alaihi wa salam) to know that there is no deity truly deserving of worship except Allah alone. And he commanded him with seeking forgiveness,
And this was the prophet, he who Allāh has forgiven all of his actions, yet he was still commanded to seek forgiveness.
Likewise, in many verses Allāh has praised those who seek his forgiveness;
And those who pray and beg Allah’s Pardon in the last hours of the night. (Āli Imrān: 17)
They are those who seek Allah’s forgiveness in the last part of the night.
The scholars said, that they are those who establish tahajjud and stand the night in prayer, worshipping Allāh, and regard themselves to be deficient, so they ask for Allāh’s forgiveness.
This is alongside the fact that they are from those who pray tahajjud and stand the night in prayer, and they seek forgiveness fearing their shortcomings, hence it is a must for people to be plentiful in seeking Allāh’s Forgiveness (The Mighty and Majestic).
Sharh Riyādh as-Sālihīn Vol.6 Pgs. 711-713
(1) Tirmidhi 2423