This is a good question. There are a few background points that need to be made.
First, we need to realize that Achilles is the greatest warrior among the Greeks. In fact, without him, the Greek cannot beat the Trojans. However, there is a problem. Achilles and Agamemnon, the leader of the Greeks, do not get along. In fact, Achilles withdraws from the battle and at one point is about to sail back to his homeland. Without the intervention of Odysseus, Achilles would have left, which would pretty much ensure Trojan victory.
Second, what makes Achilles go into battle to fight for the Greek is the death of Patroclus. Patroclus was the beloved friend of Achilles. One day, Patroclus put on the armor of Achilles and went out to battle. When he faced off with Hector, Hector killed him. After this, Achilles' inhibitions were all gone. In other words, the rage of Achilles takes over and he goes after the Trojans in a merciless fashion. In a word, Achilles goes to war to avenge Patroclus.