In Act 3, Scene 4 of "Hamlet," often referred to as the closet scene, Hamlet confronts his mother, Gertrude, in her chamber. He expresses his anger over her hasty marriage to Claudius and reveals his disgust for her actions. During their heated exchange, Hamlet accidentally kills Polonius, who is hiding behind the arras, thinking he was Claudius. This moment escalates the tension and sets off a chain of tragic events in the play.
The beginning plot of Hamlet ended in the last scene of Act 5.
The Ghost, in Hamlet, Act 1 Scene 5
Hamlet. See http://www.opensourceshakespeare.org/views/plays/play_view.php?WorkID=hamlet&Act=1&Scene=1&Scope=scene
Perhaps the line you are thinking of is Hamlet's line in Act III Scene 1: "We are arrant knaves all; believe none of us."
the person who said this was, I believe, in fact Hamlet himself at the beginning. If I am wrong forgive me, but to my educated knowledge I do believe dearly this is true. I hope this is at least some use to you - but yes, HAMLET SAID "To be, or not be - that is the question."
The last scene in Act III is the closet scene in which Hamlet kills Polonius, Gertrude recognizes that Claudius may have murdered Hamlet Senior and the Ghost makes a reappearance telling Hamlet to get on with it.
The beginning plot of Hamlet ended in the last scene of Act 5.
Horatio plans to go meet Hamlet at Elsinore, which he does in Act 1 Scene 2. Horatio plans to meet Hamlet on the battlements, which he does in Act I Scene 4. Horatio plans to meet Hamlet at the play, and does in Act 3 Scene 2. Horatio has no plans to meet Hamlet in England.
The Ghost may have been real but had only intended to show himself to Hamlet, as his message of revenge was for Hamlet only. In Act One he appeared to others but only spoke to Hamlet. Another interpretation is that the Ghost (at least in the Closet Scene) is not real, but only a product of Hamlet's mind. Similar issues arise around another Shakespearean ghost, the ghost of Banquo in Macbeth, who can only be seen by Macbeth.
She is in Act 1 Scene 2 ("Hamlet, cast thy nighted colour off."), Act 2 Scene 2 ("I doubt it is no other but the main: his father's death and our o'erhasty marriage"), Act 3 Scene 1 ("And for your part, Ophelia, I wish that your good beauties be the happy cause of Hamlet's wildness"), Act 3, Scene 2 ("The lady doth protest too much methinks"), Act 3, Scene 4 (The Closet Scene, her big scene "O Hamlet thou hast cleft my heart in twain!"), Act 4, Scene 1 ("Mad as the sea and wind when both contend"), Act 4 Scene 5 ("So full of artful jealousy is guilt it spills itself in fearing to be spilt"), Act 4 Scene 7 ("There is a willow grows aslant the brook"), and Act 5 Scene 2 ("No, no, the drink, the drink!") That's nine of the twenty scenes--she's on stage a lot.
He appears three times, in four different scenes. First he appears to Marcellus, Bernardo and Horatio in Act one Scene 1. He later appears to them with Hamlet in Act 1 Scene 4. Hamlet follows the ghost offstage then reappears chasing him in Act 1 Scene 5. The two scenes are part of the same appearance. Finally, the ghost appears briefly in the closet scene, Act 3 Scene 4.
In the first Scene, Act I scene 1, the Ghost is seen by sentinels at a platform outside the castle. (The "platform" is a raised area, an earthen mound, that gives an elevated viewing position. In performance, stage or movie, the first scene is often set on the castle ramparts, but Shakespeare's dialogue explicitly contradicts that.) In Scene 4 (Act I scene 4) the Ghost is seen by Hamlet, Horatio, and Marcellus, again at the platform. In Scene 5 (Act I scene 5) the Ghost is still being seen by Hamlet, alone now, at some distance from the platform. (This scene is probably set in or near the graveyard, but the location is not explicit in the dialogue, and identifying the setting as the graveyard relies on subtle details of interpretation.) In Scene 11 (Act 3 scene 4), the Closet Scene, the Ghost is seen by Hamlet (but not by Gertrude) in Gertrude's private room. So, overall, the Ghost appears in four Scenes, at three locations. If the questioner only wanted to know where the Ghost first appears, the answer is: at the sentinels' platform. And that happens in the first Scene.
Hamlet, Act 3, Scene 1.
Hamlet - questioning the meaning of life
Avenge his death
Act III, Scene 2.
The Ghost, in Hamlet, Act 1 Scene 5