The Prophet salAllahu alaihi wa salaam trained his Companions radiAllahu anhum to purify their souls. Through various Verses of the Qur’an and the teachings of the Prophet salAllahu alaihi wa salaam, the Companions radiAllahu anhum learned ways to purify their souls, the most important of those ways being as follows:
1) Reflecting on the universe, Allah’s created beings, and the Qur’an itself, so that they can appreciate the Greatness, Almightiness, and Wisdom of Allah subhanahu wa ta’ala.
Blessed is Allah—Lord of all worlds!” (The Clear Qur’an 7:54)
2) Contemplating the fact that Allah’s knowledge is comprehensive of all that exists in the universe, in terms of both the seen and the unseen world.
3) Worshipping Allah subhanahu wa ta’ala
This is an excerpt from the book titled "The Noble Life Of The Prophet (Peace be upon him)" Volume 1 by Dr. 'Ali Muhammad As- Sallaabee (page 276)