Okay, so a long long time ago, there were some people who followed a religion called Islam. They decided they wanted more people to follow their religion too, so they went on a big journey and started taking over places. One of the places they took over was Afghanistan, which is a country far far away.
Back then, Afghanistan wasn't just one big country like it is now. It was made up of lots of smaller places with different rulers. The Muslim people wanted to take over all of these smaller places so that they could have one big Muslim country.
To do this, they used their army and fought with the rulers of each smaller place until they won. Once they won, they made the people who lived there follow Islam too. They also built lots of new things like mosques and schools for the people to use.
This all happened a really long time ago, but Afghanistan is still a Muslim country to this day because of what the Muslim people did all those years ago.