(1) The first type of guidance is that which is needed for welfare in this worldly life. This type of guidance is given, in general, to all humans, whether believers or not. This includes the natural disposition that people have at birth to pursue what benefits them and refrain from what harms them. It also includes the guidance given to the young infant who, for example, knows how to suckle as his mother's breast. Prophet Moses عليه السلام said in response to being asked who was his Lord,
"He said, 'My Lord is He who gave to each thing its form and nature, then guided it aright.'" (Soorah Ta Ha, 20:50)
Al-Isfahaani رحمه الله points out that if a person does not have this type of guidance, which includes mental capacity, then he will not have the other types of guidance. In fact, he will not be held responsible for his actions in this life.
(2) The second type of guidance is showing mankind what benefits them in a religious sense and, thus, concerning the Hereafter. For this purpose, clear signs have been shown, messengers have been sent and books have been revealed. This type of guidance is also offered to all of mankind, believers and disbelievers - the believers, of course, accept the guidance while the unbelievers do not. For example, Allaah سبحانه و تعالى says about the people of Thamood,
"And as for Thamood, We showed and made clear to them the Path of Truth, but they preferred blindness to guidance, so the Sa'iqah (a destructive awful cry, torment, hit, a thunderbolt) of disgracing torment seized them, because of what they used to earn." (Soorah Fussilat, 41:17)
This type of guidance may be "attributed" to the Qur'aan, the prophets or anyone who shows another what the straight path is.
(3) The third type of guidance is in reference to the placing of faith and guidance in the heart of the individual. This is something that can only be done by Allaah سبحانه و تعالى. This type of guidance is referred to in numerous places in the Qur'aan. For example, Allaah سبحانه و تعالى says,
"He whom Allaah guides, he is the rightly guided. But for him whom He sends astray you will find no guiding friend to lead him [to the Straight Path]." (Soorah al-Kahf, 18:17)
(4) The fourth type of guidance is the guidance in the Hereafter or the guidance to the path to Paradise. Allaah سبحانه و تعالى says in the Qur'aan,
"Verily, those who believe and do deeds of righteousness, their Lord will guide them through their faith, under them will flow rivers in the Garden of Delight." (Soorah Yoonus, 10:9)
The last type of guidance is the result of following the second type of guidance, which can only be followed if one has been granted the blessing of the third type of guidance.
Note that of the different type of guidance, three of them come only from Allaah سبحانه و تعالى. That is, others may show the straight path and try to convince others to follow it but the other types of guidance are solely from Allaah سبحانه و تعالى alone. Therefore, any individual who has been blessed by Allaah سبحانه و تعالى to achieve those different types of guidance must be very thankful to Allaah سبحانه و تعالى for that great blessing.
In fact, even the other category of guidance originates with Allaah سبحانه و تعالى as He is the one who revealed the true guidance, like the Qur'aan. Without that revelation and Allaah's sending of messengers, that type of guidance would also be unknown to humans. Hence, Allaah سبحانه و تعالى must be praised and thanked for every type and aspect of guidance that there is in this world.
[Following the discussion of Shaykh al-Islam Ibn Tamiyyah رحمه الله: Majmoo' al-Fatawa, vol. 18, pp. 171-175 and ar-Raaghib al-Isfahaani رحمه الله, pp. 539ff, as quoted in Commentary on the Forty Hadeeth of Imam an-Nawawi رحمه الله, vol. 2, pp. 771-773]