Shaykh ibnu Uthaymeen said:
Patience is of three types:
1. Being patient upon obeying Allah.
By restraining yourself (from things) to carry out actions of obedience.
For example: A man wants to pray, then his soul attracts him to laziness or to sleep or to eat what he has no need for or to talk with friends but he instead made it binding upon himself to pray. This is patience upon Allah’s obedience.
2. Being patient upon not disobeying Allah.
By restraining yourself from doing something impermissible even with the presence of the means attracting you to it.
For example: A man’s soul tells him to fornicate, so he prevents himself from doing so. So we say this is patience in not disobeying Allah. Also what occurred to Prophet Yusuf (alayhissalaam) with the wife of Al-Azeez when she tried to seduce him in the most powerful of ways as she locked all the doors and called him to her. He did not do it even with the strong seducing call and absence of that which could prevent him (alone/doors locked). This is patience upon not disobeying Allah.
3. Being patient upon Allah’s decree.
Indeed Allah decrees for his slave that which is agreeable to his nature and that which is not agreeable. That which is not agreeable is in need of patience, that he retrains himself from resentment of the heart, in speech (wailing) or in action (tearing his clothes) if a calamity befalls him and that he should (instead) say that he is pleased with his lord.
Summarised – Explanation of Nawawe’s 40 Hadith by Shaykh Uthaymeen