The attack on the World Trade Center had mainly long-term goals. It was intended by its planners to win supporters to the long-term project of spreading Islamic theocracy by scoring a major coup, and by dragging the US into a war where it could be beaten.
The bombings in London had mainly short-term goals. It was intended by its planners, who were probably also the bombers, to drive Britain out of Iraq.
The invasion of Afghanistan had mainly short-term goals. It was intended to destroy the organisation which had planned the WTC attack, to punish them and to prevent them repeating it.
The invasion of Iraq had mainly long-term goals. There was a long article out about a month ago spelling out that the intention was not to prevent another WTC-style medium-tech terrorist attack, it was to prevent something much bigger, perhaps ten or twenty-five years down the road, by democratizing the Middle East so as not to contain any states that might feed future terrorists with nuclear weapons.
Unfortunately I can't now find the article - the nearest thing I've got to spelling it out is GWB's May speech.