A mujahid is one who strives or struggles on behalf of Islam; mujahideen is the plural of the same word. The word mujahid is an Arabic participle drawn from the same root as the Arabic word jihad, to strive or struggle.
The term is most frequently used in reference to the self named Afghan mujahideen, the guerrilla fighters who battled the Soviet army from 1979 1989, when the Soviets withdrew in defeat. The Soviets invaded in December, 1979 in order to provide support a recently installed pro-Soviet prime minister, Babrak Karmal.
The mujahideen were fighters from the mountainous areas of the largely rural country, and also maintained bases in Pakistan. They were entirely independent of the government. Mujahideen fought under the command of tribal leaders, who also headed Islamist political parties, which ranged from radical to moderate. The mujahideen received arms by way of Pakistan and Iran, both of which share a border. They made use of an arsenal of guerrilla tactics to thwart the Soviets, such as laying ambushes or blowing up gas pipelines between the two countries. They were estimated to be about 90,000 strong in the mid-1980s.
The Afghan mujahideen were not seeking to wage an aggressive jihad beyond national boundaries, but were rather fighting a nationalist war against an occupier. The language of Islam helped unify a population that wasand still is--otherwise very heterogonous: Afghans have many tribal, ethnic and linguistic differences. After the war ended in 1989, these different factions returned to their previous divisiveness and fought each other, until the Taliban established rule in 1991.
These unorganized guerrilla warriors were viewed as outlaws by their Soviet enemy and as "freedom fighters" by the Reagan Administration in the U.S., which supported the 'enemy of its enemy,' the Soviet Union.