What is the relationship between the characters in Shakespeare's play Hamlet?
Gertrude is Hamlet's mother, former wife of Old King Hamlet (who is now dead, and a ghost), and current wife of Old King Hamlet's brother, Claudius. Therefore, Claudius is Hamlet's uncle and now his step-father as well. The relationship between Claudius and Hamlet is adversarial at best, and once Old King Hamlet's ghost tells Hamlet that Claudius murdered him, it gets even worse. Further, the relationship between Hamlet and his mother, Gertrude, is strained because he feels that she betrayed his father by marrying his brother, and so soon after his father's death (fewer than two months).
Polonius is Claudius's closest adviser, and he is also the father of Ophelia, Hamlet's former lover/girlfriend, and Laertes, the man with whom Hamlet eventually duels (at the play's end) and whose poison kills both himself and Hamlet. Hamlet does not care for Polonius at all, especially after Ophelia follows Polonius's advice and begins to severe ties with him. After Hamlet kills Polonius, thinking he was Claudius, Laertes returns from abroad with plans to avenge his father's death. This is why he challenges Hamlet and tips his rapier with the poison.
Horatio is basically Hamlet's best friend from school. He is legitimately loyal to and loving of Hamlet. Rosencrantz and Guildenstern are also school friends, but, when Claudius recruits them to spy on Hamlet for him, Hamlet figures it out and refuses to trust them. (They didn't really realize that they were being used.)