Western France and Southern England, Late 12th-Early 13th Centuries
The setting of this play can seem a little complicated, but don't worry—you've got this. To break things down a bit, let's start by talking about the physical location of the action. Then we can talk about its time frame.
The physical location of the action switches back and forth between England and France. Act I of the play is set at King John's royal court in London, England. Acts II and III are set in France, outside the city of Angers. Then, in Act IV, the action shifts back to England.
From this point until the end of the play, the action takes place in various locations in England: at King John's court in London; at the mysterious castle where Arthur is held prisoner by Hubert; at other outdoor locations, where various battles take place; and, finally, at Swinstead Abbey in Lincolnshire, where King John dies by poisoning.
As for the time frame of the play, it has to take place between the years 1199 and 1216, when the historical King John reigned. So the play obviously ends in 1216, because that's when John actually died. Since John's conflict with Arthur started pretty much immediately after he was crowned king, we can guess that the play starts in 1199.
Now, this causes some problems, because it really doesn't feel like 17 years have passed from the beginning of the play to the end. So it's probably best not to sweat the exact historical details too much; Shakespeare himself doesn't care too much about total consistency.
What's most important is that King John takes place at a time when the authority of kings was still highly dependent on the backing of powerful noblemen, who could turn on them at any moment—just as Salisbury, Pembroke, and Bigot do to John in Shakespeare's play.
Also, at the time when King John takes place, English kings still owned lots of territory in France—that explains why the citizens of Angers say that they are loyal to the king of England. In this map, you can see the territory of the "Angevin Empire" (the territory owned by the kings of England) under Richard I, the previous king to King John.
Finally, it's important to remember that, as much as King John is about, well, King John, it's also about the events of Shakespeare's own day, in Elizabethan England. To learn more about these connections, check out our "In A Nutshell" section.