I think you can find your answer in the reply I gave here:
It's also worth stressing that in the case of Troy, the reason that the war lasted 10 years was because of prophecy: Troy was foretold not to fall until the tenth year. This is why the Greeks don't bother to actually besiege the city, and the fighting doesn't get intense until the final year, when the Greeks were destined to sack the city. The Iliad is set during the tenth and final year of the war.
Feel free to ask follow-up questions here.