It is one of his later plays, believed to have been written around 1602, shortly after the completion of Hamlet. It was not published until 1609 and it is not known if it was performed.
Shakespeare drew on a number of sources for the play, notably the medieval pastiches on ancient Greek writers that were very popular in his time, including Chaucer's version of the tale, Troilus and Criseyde.
In terms of structure the play falls between a number of recognised genres. Presented as a historical romance it also has elements, if not the structure, of a tragedy as well as comedy themes which link it to the later Shakespearean comedies such as Measure for Measure.
The main characters are Troilus, a Trojan prince; Cressida, the daughter of a Trojan priest and defector; Pandarus, Cressdia's uncle; Diomedes, a Greek soldier; and a number of more recognised characters from the Iliad - Achilles, Agamemnon, Ulysses, Hector, Priam etc.
Much of the plot is reasonable close to the traditional accounts of the siege of Troy, the acts switch between the relationship and the political.