Laertes', fervent in his anger, secretly returns early from France and storms the castle with a mob hailing him as king. His anger highlights the difference between him and Hamlet. Hamlet was thoughtful, and he had difficulty acting. He could not kill Claudius in the church. Laertes on the other hand doesn't think, but only acts in his desire for revenge. Unlike Hamlet, he has no problem acting and will go to any lengths to avenge his father's death. Laertes says that he would have no problem slitting Hamlet's throat in the church, starkly contrasting Hamlet's inability to act in a place of worship.
Earlier in the play, we see Polonius sending Laertes back to school. Polonius doubts Laertes' conduct (giving him all sorts of advice in Act I, scene 3) and later sending a spy after him (in Act II, scene 1). In Act IV, scene 5, however, we see Laertes' true affection for his father and his sister.
His anger shows that he is adamant about wanting the truth about his father's death. In line 135, he tells Claudiu, "Come what comes, only I'll be revenged / Most thoroughly for my father." Laertes is a foil to Hamlet, because unlike Hamlet, Laertes is ready and anxious to avenge his father and go after his father's killer. His anger shows that he is a man of action, because he is taking his anger and fustration out on not just any man, but Claudius (the king himself).
We also see how distraught he is over the madness of his sister. This scene serves to contrast Laertes and Hamlet, and it also helps us feel some sympathy for Laertes, as Laertes reveals his ability to feel affection and grief for the loss of his father's life and the loss of his sister's sanity.