Hamlet makes it clear in the earlier part of the scene...
When Hamlet first appears in act 1, scene 2 of Shakespeare's Hamlet, he's obviously troubled, but it's not until his rambling soliloquy midway through the scene that the audience is made aware of what is truly troubling him.
Hamlet makes it clear in the earlier part of the scene that he's grieving his father's death. Hamlet's uncle, Claudius (now king), and his mother, Gertrude (now married to Claudius), aren't happy with the extent to which Hamlet is displaying his grief, but Hamlet pretty much ignores them about that.
Claudius and Gertrude ask Hamlet to stay in Denmark rather than return to school in Wittenberg—Claudius wants to keep an eye on Hamlet, and Gertrude simply misses him—and Hamlet acquiesces to their request without objection.
What's clear, too, is that Hamlet doesn't like his uncle, although the nature of the conflict isn't made clear until Hamlet's soliloquy.
In his soliloquy, Hamlet starts with the usual questioning of his existence—essentially, "why was I born, and maybe I should just kill myself"—which he revisits periodically during the play, but the primary focus of the soliloquy is what Hamlet perceives as his mother's "incestuous" marriage to Claudius. Hamlet might not have liked Claudius very much anyway, but Claudius's marriage to his mother simply exacerbates any ill feelings that Hamlet has for Claudius.
Hamlet's soliloquy shows, however, that even though he dislikes Claudius, at that point in the play Hamlet is more upset with his mother and that he holds his mother more responsible than Claudius for the marriage. Hamlet knows that he can't do anything about the marriage, and he decides to keep his thoughts and feelings about his mother to himself.
HAMLET. It is not, nor it cannot come to, good.
But break, my heart, for I must hold my tongue! (act 1, scene 2, lines 161–162)
Once the ghost of Hamlet's father tells Hamlet that Claudius murdered him, however, Hamlet's conflict with Claudius intensifies and becomes the focus of his existence, while Hamlet's conflict with his mother seems to dissipate entirely.
The inner conflict for Hamlet is not "To be, or not to be"—because he already decided not to kill himself in the first soliloquy—but "should I or shouldn't I?" Should he avenge his father's murder by killing Claudius or not? Hamlet's external conflict with Claudius, that he basically doesn't like him, becomes Hamlet's inner conflict because he vows to avenge his father's death.
Hamlet resolves this conflict by finding reasons to do nothing. He questions the veracity of the ghost and decides he needs more proof of Claudius's guilt.
HAMLET. The spirit that I have seen
May be a devil; and the devil hath power
T' assume a pleasing shape; yea, and perhaps
Out of my weakness and my melancholy,
As he is very potent with such spirits,
Abuses me to damn me. I'll have grounds
More relative than this. The play's the thing
Wherein I'll catch the conscience of the King. (act 2, scene 2, lines 593–600)
Hamlet has a perfect opportunity to kill Claudius while he's praying, but the fact that Claudius is praying gives Hamlet a perfect excuse not to kill him.
HAMLET. Now might I do it pat, now he is praying;
And now I'll do't. And so he goes to heaven,
And so am I revenged. That would be scann'd.
A villain kills my father; and for that,
I, his sole son, do this same villain send
O, this is hire and salary, not revenge! (act 3, scene 3, lines 76–81)
Hamlet's external and internal conflicts with Claudius are resolved concurrently at the end of the play but by the circumstances of the moment, not by Hamlet's intentional fulfillment of his vow to avenge his father's death. Hamlet is overwhelmed by emotion at his mother's death and his own impending death, and Hamlet strikes out at Claudius, killing him.