The first time Afghanistan was invaded it was in 550 BCE, as Darius the Great of Persia tried to expand his empire into Central Asia. Arguably, he set the precedence for further invasions of Afghanistan. A brief occupation, followed by bloody tribal revolts and constant resistance. Eventual withdrawal after taking heavy casualties.
The second invasion was undertaken by Alexander the Great. It was the first part of his empire to collapse, mostly thanks to bloody tribal revolts and constant resistance.
The next to arrive was the Tang Chinese. Despite having ten million more guys then the Afghans, their armies quickly succumbed to bloody tribal revolts and constant resistance.
After that came the mongols. They, being experts themselves at bloody suppression of resistance, managed to keep hold of the country. Until Genghis Khan died. Bloody tribal revolts and constant resistance quickly forced the mongols out.
After that came two more Persian invasions, an Indian one, and several attacks from other Central Asian nations. All were forced out by bloody tribal revolts and constant resistance.
The year is now 1836, and Afghanistan is physical proof that people don't learn for history. The British Empire looks to expand it's influence into Central Asia. The Russians look for a Central Asian puppet to curb British efforts. The land hungry Chinese turn West to fill their bellies. Warlords and tyrants of Central Asia look to expand their own power. Corruption and political isolation has left Dost Mohammad Khan, King of Afghanistan, with little control beyond his palace. To any outside observer Afghanistan's future appears uncertain. But all Afghans know what the future holds...
Bloody tribal revolts and constant resistance.