Achilles is enraged because Agamemnon quite arbitrarily takes possession of Briseis, his "maid of honor" (i.e. his concubine), a girl whom Achilles had kidnapped from a Trojan priest. Achilles in reprisal refuses to fight and withdraws his force of Myrmidons from the battlefield. He does not leave Troy but simply lounges in his tent while the Greeks, without his powerful assistance, are being driven back by the Trojans led by their hero Hector, until the Trojans are actually threatening to destroy all the Greek ships and some of the ships are actually in flames.
This is an artistic device on the part of Homer. He saves his most fearsome warrior until near the end of his epic, thereby creating a powerful dramatic conclusion, especially since Achilles is so angered at the death of his good friend Patroclus that he drives the entire Trojan army off the battlefield and into the walled city, with the exception of Hector, who feels duty bound to stand and fight him. When Achilles slays Hector that is the beginning of the end for the Trojans.
In his play Troilus and Cressida, Shakespeare wrote some amusing scenes about Achilles lounging in his tent with Patroclus.