What happens at the end of Hamlet?
A lot of things happen, all in quick succession. Osric brings Hamlet an invitation to fence with Laertes, and Hamlet agrees. The duel will happen before the court and, when it does, everything comes apart. To be specific, Claudius poisons a cup of wine hoping to kill Hamlet that way. However, Queen Gertrude drinks it, accidentally killing herself. Laertes is using a poisoned blade. He wounds Hamlet, then they scuffle and end up swapping swords, and Hamlet wounds him. When Laertes asks forgiveness, pointing blame to Claudius, and Hamlet realizes that he's been betrayed again, Hamlet stabs his uncle with the poisoned blade. By the end of Act V, Hamlet, Gertrude, Claudius, and Laertes are all dead; Fortinbras is handed the Crown of Denmark thus according with Hamlet's last request.
Hamlet accepts Laertes' challenge to a duel. Hamlet is pricked with Laertes sword, which is laced with poison. They take a break and the King urges Hamlet to drink from the poisoned cup. Instead, Hamlet's mother takes the cup and drinks it. Quickly thereafter, she dies. Laertes tips Hamlet off as to why she died; he also lets Hamlet know he's a dead man because of the poisoned sword. Hamlet forces the King to drink from the poisoned cup so that he dies too. Then, as Hamlet dies, he forgives Laertes, tells Horatio to tell his tale, and dies. Hamlet, the King and Queen, and Laertes are all poisoned in the last act. It is understood that then Fortinbras comes in to pick up the pieces of the shattered kingdom
There are a ton of things that take place at the end of Hamlet, but at the end of Hamlet, he finally gets his revenge on Claudius and Fortinbras is crowned the new King. After the intense events that happen after Gertrude dies, one after another each character meets their death. At the very end when Hamlet dies, Fortinbras come in at that moment to see death and destruction. Since Hamlet told Horatio to live in order to tell others the truth, he fills Fortinbras in with what happened and tells him he is the new King.