The action of Troilus and Cressida takes place during the Trojan War - after Achilles' withdrawal from the fighting and including his return to battle. Troilus and Cressida are Trojans, and although they quite fancy each other, they haven't really done anything about it. Cressida's Uncle Pandarus helps them get together, but then war intervenes as Cressida's father goes over to the Greek camp and Cressida is traded to the Greeks in exchange for a soldier. And the Greek soldier Diomedes is mightily interested in the new lady in camp.
It's unfortunate that throughout the whole play, Troilus' attitude towards love and war is exactly the same. His thinking and attitudes are rigid - he holds to set opinions and prides himself on his honour and will, constantly overriding his perception of people and events. This is a great pity as he completely misinterprets the actions of his witty and perceptive girlfriend (who he thinks has betrayed him) just as the Trojans and Greeks blindly and willingly ignore opportunities to stop the war. Troilus, the Trojans, and the Greeks are not willing to adjust their thoughts and actions to the circumstances, leading to tragedy for all.