After the Soviet Union invaded Afghanistan in 1979, bin Laden had seen the attack as an insult and act of aggression towards Islam. That's when he began to start a resistance against the Union. He had collaborated with many Arab volunteers to help with the resistance. After much help from Afghan resistance leaders and his collaboration with Azzam, Osama had created a militant network named al-Qaeda (the Base) in 1988. This is basically how him and his base attacked the U.S., 12 years later.
Hope this helped a lot!