Firstly, jihad is of various kinds, some of which are obligatory upon everyone who is accountable, and some are obligatory upon the community as a whole if some people undertake them then the rest are relieved of the obligation. And some kinds of jihad are mustahabb.
Jihad al-nafs (struggle against one's self and selfish desires) and jihad al-shaytaan (jihad against Satan) are obligatory upon everyone who is accountable. Jihad against the munaafiqeen (hypocrites), kaafirs (disbelievers) and leaders of oppression and innovation is obligatory upon the community as a whole. Physical jihad (i.e. fighting) against the kaafirs may become an individual obligation upon everyone who is able to do it in certain circumstances, which will be described below.
Ibn al-Qayyim (may Allah have mercy on him) said: Once this is understood, then jihad is of four kinds: Jihad al-nafs (jihad against one's self), jihad al-shaytaan (jihad against Satan), jihad against the kaafirs and jihad against the hypocrites.
Jihad al-nafs (jihad against one's self) is of four kinds: 1. Striving to learn the teachings of Islam without which one cannot attain success and happiness in this world or in the Hereafter; if this is missing then one is doomed to misery in this world and in the hereafter.
2 Striving to make oneself act in accordance with what one has learned. Simply knowing without acting, even though it may not cause any harm, is not going to bring any benefit.
3 Striving to call others to Islam, teaching those who do not know about it. Otherwise one will be one of those who conceal that which Allaah has revealed of guidance and teaching, and it will not benefit him or save him from the punishment of Allaah.
4 Striving to bear patiently the difficulties involved in calling people to Allah and the insults of people; bearing all that for the sake of Allah.
If a person achieves all these four levels, then he will be one of the rabbaaniyyeen (learned men of religion who practice what they know and also preach to others. Cf. al-Imraan 3:79). The salaf (Muslims from Muhammad's generation) were agreed that the scholar does not deserve to be called a rabbani unless he knows the truth, acts in accordance with it and teaches it to others. Whoever teaches, acts in accordance with his knowledge and has knowledge, he will be called great in the kingdom of heaven.
Jihad against the Shaytan is of two types: 1. Warding off the doubts that he stirs up to undermine faith. 2. Striving against him to ward off the corrupt desires that he provokes.
The first jihad is followed by certainty of faith, and the second is followed by patience. Allah says (interpretation of the meaning): And We made from among them (Children of Israel), leaders, giving guidance under Our Command, when they were patient and used to believe with certainty in our ayat (proofs, evidences, verses, lessons, signs, revelations, etc.) al-Sajdah 32:24]
Allaah tells us that leadership in religion is attained through patience and certainty of faith. Patience wards off desires and certainty wards off doubts.
Jihad against the kaafirs and hypocrites is of four kinds: with the heart, the tongue, one's wealth and oneself. Jihad against the kaafirs is more along the lines of physical fighting whereas jihad against the hypocrites is more along the lines of using words and ideas.
Jihad against the leaders of oppression and innovation is of three kinds: 1. Jihad with one's hand (i.e., physical jihad, fighting) if one is able. If that is not possible then it should be with one's tongue (i.e., by speaking out). If that is not possible then it should be with one's heart (i.e., by hating the evil and feeling that it is wrong).
These are the thirteen types of jihad, and whoever dies without having fought or having resolved to fight has died following one of the branches of hypocrisy. (a tradition of the Prophet [hadith] narrated by Muslim, 1910). Zaad al-Maad, 3/9-11)
Shaykh Abd al-Aziz ibn Baaz (may Allah have mercy on him) said: "Jihad is of various kinds, with one's self, one's wealth, by making dua (supplications), by teaching and guiding, by helping to do good in any way. The greatest form of jihad is jihad with one's self (i.e., going oneself and fighting), followed by jihad with one's wealth, jihad by speaking out and guiding others. Dawa (proselyzation) is also part of jihad. But going out oneself to fight in jihad is the highest form. (Fatawa al-Shaykh Ibn Baaz, 7/334, 335)
Secondly, the idea of waging physical jihad against the kaafirs went through a number of stages, depending on the state in which the Muslim umma was. Ibn al-Qayyim (may Allah have mercy on him) said: "The first thing which his Lord revealed to him was to read in the name of his Lord who had created. That was the beginning of his Prophethood, where Allah commanded him to recite to himself but He did not yet command him to convey that. Then He revealed the words (interpretation of the meaning: O you (Muhammad) enveloped in garments! Arise and warn!" [al-Muddaththir 74:1-2]
So he became a Prophet with the word "Iqra" (Read!) and he became a Messenger with the words, "O you (Muhammad) enveloped in garments." Then Allah commanded him to warn his closest kinsmen, then to warn his people, then to warn the Arabs around them, then to warn all the Arabs, then to warn all of mankind. He continued to call them for over ten years from the beginning of his Prophethood, without fighting or imposing the jizya (tax levied upon non-Muslims living under Muslim rule); he was commanded to refrain, to be patient and to be forbearing.
Then permission was given to him to migrate, and permission was given to him to fight.
Then he was commanded to fight those who fought him, and to refrain from fighting those who left him alone and did not fight him.
Then Allah commanded him to fight the mushrikeen (people who devote acts of worship to something or someone other than God), so that the religion would all be for Allah.
After jihad was enjoined upon him, the kaafirs (people who deny and conceal the truth) then fell into three categories: those with whom there was a truce or peace treaty; those with whom he was at war; and those who lived under the rule and protection of the Islamic state." (Zaad al-Maad, 3/159)
Thirdly, the ruling on physical jihad against the kaafirs is that this is an obligation on the community as a whole (fard kafaayah).
Ibn Qudaamah said: Jihad is an obligation upon the community; if some people undertake it, the rest are relieved of the obligation.
What fard kafaayah means is that if it is not undertaken by enough people, then all the people are guilty of sin, but if enough people undertakes it, the rest will be relieved of blame. Initially the command is addressed to all of them, as in the case of an individual obligation (fard ayn), but then in the case of fard kafaayah the obligation is dropped if enough of the people undertake to do it, unlike the case with fard ayn where the obligation is not dropped if someone else does it. Jihad is a fard kafaayah, according to the majority of scholars. (al-Mughni, 9/163)
Shaykh Abd al-Aziz ibn Baaz said: "We have previously explained on more than one occasion that jihad is fard kafaayah, not fard ayn. All Muslims are enjoined to support their brothers with their selves (i.e., physically, by joining them), or with money, weapons, dawa and advice. If enough of them go out (to fight), the rest are freed from sin, but if none of them do that then all of them are sinners.
The Muslims in Saudi Arabia, Africa, North Africa and elsewhere are obliged to do their utmost, and if there is a jihad in one country, the surrounding countries should hasten to help them, the closest then the next closest. If one or two states, or three or more, manage to fulfil the obligation, then the rest are freed of responsibility. They deserve to be supported, and it is obligatory to help them against their enemies, because they are oppressed. Alaah has enjoined jihad upon all Muslims, and they must fight against the enemies of Allah until their brothers are victorious. If they fail to do that then they are sinners, but if sufficient people undertake to do that, then the rest are absolved of sin. (Fatawa al-Shaykh Ibn Baaz, 7/335)
Fourthly, physical jihad against the kaafirs becomes obligatory in four cases, which are: 1. When the Muslim is present in a jihad situation. 2. When the enemy has come and attacked a Muslim land 3. When the ruler mobilizes the people, they must respond. 4. When a person is needed and no one else can do the task except him.
Shaykh Ibn Uthaymeen said: Jihad is obligatory and becomes fard ayn(an individual obligation/religious duty) if a person is present where fighting is going on. This is the first of the situations in which jihad becomes an individual obligation, because Allah says (interpretation of the meaning): O you who believe! When you meet those who disbelieve, in a battlefield, never turn your backs to them.
And whoever turns his back to them on such a day "unless it be a stratagem of war, or to retreat to a troop (of his own),