Unlike, say, Romeo and Juliet, which opens with a poetic prologue explaining the set-up, Hamlet begins in media res - "into the middle of affairs". And truly, once you factor in the backstory that Shakespeare's going to work into the play, that's almost precisely where this play starts: pretty much smack in the middle of a story arc that starts with Claudius's decision to kill his brother, good King Hamlet, and ends with pretty much everyone by Horatio dead.
There's no prologue to tell us the set up, and no mystical mumbo-jumbo afoot as there was in Macbeth, where the witches arrive to announce the theme of the play ("fair is foul and foul is fair"). No, this is more like King Lear, where actors arrive on stage and the audience has to sort out what's going on for themselves - with significant backstory help from the actors, of course.
ACT I, SCENE 1 - at least 50% backstory
We do not meet our protagonist, Hamlet, in Act I, scene 1. Rather, we get a mix of backstory and foreshadowing, which can be summed up as follows:
First bit of backstory in Act I, scene 1:
Hi, we're Francisco and Bernardo, members of the night watch, and we're on the lookout for Horatio and Marcellus, two upstanding individuals who are completely and totally trustworthy. (Exit Francisco)
Hi, we're Horatio and Marcellus. Horatio here doesn't believe Marcellus and Bernardo, who have seen a ghost walking about the platform. He calls "bullshit" on their claims.
Bernardo establishes what the ghost's habit has been, et voilà, the ghost turns up right on schedule, looking just like the dead king. At which point our first bit of backstory ends, and Horatio tries to chat up the ghost, who's having none of it.
Second bit of backstory in Act I, scene 1:
The cue for this bit of backstory comes from Marcellus: "See? Didn't that ghost look like the king?"
At which point, Horatio waxes eloquent about the king - emphasizing first what a warrior/man of action dead King Hamlet was - combatting Norway, slaying Poles. His ghost prowls about in a martial way.
Time out for foreshadowing
Shakespeare interrupts his backstory for a bit of foreshadowing with Horatio's line, "This bodes some strange eruption to our state." This presages Marcellus's later opinion (in Act I, scene 4) that "something is rotten in the state of Denmark." It is also a pun and a triple entendre. The phrase "strange eruption to our state" means all of the following:
1. something disturbing is about to unfold
2. like a volcano, something is about to blow
3. like acne or the pox (or venereal disease), the body of state is infected/festering
Third bit of backstory in Act I, scene 1:
Marcellus again asks the question that cues more backstory: "What's up with all the making of cannons and arms and the building of ships?"
Horatio knows the answer, which involves a history lesson, given in an "as you know, Bob" manner:
King Hamlet had a run-in with Fortinbras (Sr.) of Norway, who challenged King Hamlet. King Hamlet killed Fortinbras, thereby winning a bunch of land. Young Fortinbras is a hot-blooded upstart who wants those lands back and has been raising an army to try to take them, so Denmark is preparing to stave him off.
Bernardo says, in effect, "Aha - no wonder the ghost of the dead king is here, he was always such a great soldier." This backstory foreshadows later events, in which Fortinbras marches on Denmark after all.
A final bit of foreshadowing, product placement, and present action
Horatio makes a comparison to Rome in the days before Julius Caesar's death (possibly cross-marketing another of Shakespeare's plays - product placement sells, folks!), referring to walking ghosts being harbingers of bad things to come.
The ghost reappears, and Horatio speaks to it. He specifically inquires whether there's anything he can do to ease the ghost's situation, and whether the ghost has information about something that is to happen to the country. The three men try to detain the ghost, which disappears, and they regret having been rough with it. They plan to break their watch up, and to tell Hamlet what they saw. Horatio predicts that the ghost will speak to Hamlet.
ACT I, SCENE II - Backstory about Claudius and Gertrude
Claudius opens the scene with a lengthy speech about how he's sad about his brother's death, but really happy to have married the widowed queen. He actual says "with mirth in funeral and with dirge in marriage", and if that's not 1) an admission of his true feeling about his brother's death and 2) a bit of foreshadowing of the outcome of his nuptials, I don't know what is - but such is the subtleness and cleverness of Shakespeare, and I ought (by now) not be amazed by it.
He then gives his own "as you know Bob" summary of what's going on with young Fortinbras, in far more detail than Horatio did. It brings the audience completely up to speed on the situation as it now stands, and establishes Claudius as a competent ruler (at least in the execution of his duties).
Laertes gives us his own backstory - "I was at school in France and would like to go back, KTHANXBAI."
And we finally meet Hamlet, and learn that he's been brooding. A lot. And that Claudius considers it "unmanly grief." And Gertrude asks Hamlet not to return to school in Wittenberg.
Once everyone but Hamlet leaves the stage, we learn from his first soliloquy that he is in such deep depression that he's considering suicide, and then - in that same soliloquy - we get backstory on King Hamlet as a loving husband, and learn that Hamlet thinks Gertrude's a whore for taking up with Claudius at all, let alone so very, very quickly.
Only a wee bit of additional backstory comes in once Horatio, Marcellus and Bernardo arrive, in the form of learning how close together came the funeral of the king and the remarriage of his queen.
The scene ends with additional foreshadowing
Hamlet, left alone, observes that his father's ghost appearing, and in arms, bodes ill. "All is not well./I doubt some foul play. . . . Foul deeds will rise,/Though all the earth o'erwhelm them, to men's eyes."
Here, the word "doubt" means "suspect" - Hamlet believes foul play has taken, is taking, or will take place. All of which is true.
Later today: Foreshadowing and backstory involving Ophelia