In Osool al-Fiqh (principles of fiqh) we have five rulings, and everything a person does falls into these five catergories and they are:
1. Waajib (also known as Fardh) if not performed the person will be sinning, if performed the person will be rewarded, example of this are the five daily prayers.
2 Mustahhab (aka Manduub) if not performed the person will not be sinning if performed the person will be rewarded, example of this would be the sunnah prayers. (NB! Do not confuse the word sunnah for the Sunnah of the Prophet which we HAVE to follow)
3. Mubaah, if not performed the person will not be sinning likewise if he performs it he will not be rewarded (some scholars say that any mubaah action can be changed into reward or sin depending on the intention) example being eating food.
4. Makruuh if a person performs this action he will not be sinning but if he leaves it off he gets rewarded. Example being giving and taking with the left hand.
5. Haraam, if a person performs this action he will be sinning and if he leaves it off he will be rewarded example being disobedience towards the parents.
Now there are five things that are considered mustahhab (voluntarly) but once a person undertakes the action it changes into waajib and the person is obliged to complete it (however some of these things are debated amongst the scholars themselves).
These five things are
1. Jihaad.
This is not the jihaad that is waajib, like if your country is attacked and you are required to defend your life and property nor if the ruler calls you out for jihaad. Rather this is if you hear of a legitimate struggle being fought by oppressed muslims (sanctioned by trustworthy scholars) and you want to help them.
For you to fly there and help them is not waajib upon you, but if you decide to do this then you will have to complete it and you are not allowed to run away and leave them.
2. Umrah.
Even though 'Umrah is considered waajib within some schools of thought this is in reference to a voluntarily 'Umrah. Meaning a person has already performed one 'Umrah but wants to perform another one some other time in his life, as soon as the person enters the state of Ihraam it becomes waajib upon him to finish the 'Umrah.
3. Hajj.
Hajj is very similar to 'Umrah, and this is not in reference to the Hajj of Islaam, meaning the hajj that is considered a pillar in Islaam. Since Hajj is waajib only one time in a person's lifetime this is in reference to any other Hajj after the first one.
If a person starts his hajj, he is not allowed to say, you know what, this is to difficult I want to quit.
4. Janaazah.
Janaazah is known as Fardh Kifaayah, meaning if a group of muslims pray upon the deceased then the whole community will be sin free (ie every single person does not have to pray janaazah) however if no one at all from the community prays for the dead, then the entire community becomes sinful.
So if a person joins the janaazah prayer he has to finish it and can not leave it, it becomes waajib upon him.
5. Seeking knowledge.
Now this is a very debated thing, is a person allowed to leave seeking knowledge once starting it? Scholars debate both ways, and what seems to be closest to the truth - and Allah knows best - is that a muslim should always seek knowledge where ever they might be so that they know how to worship their Lord properly.
However if a person left to study in a country and then decides to leave that country, does this mean he left seeking knowledge? Not necessarily, but what is required is that the person does not stop seeking knowledge altogether.