The subplots in Hamlet, that are related to the main plot are:
1) Ophelia's madness and suicide. Ophelia is Hamlet's love interest, but their relationship is complicated by Hamlet's grief and madness. Ophelia's father, Polonius, is killed by Hamlet, which drives her mad. She eventually commits suicide.
2) Laertes' revenge. Laertes is Polonius' son and Ophelia's brother. He returns to Denmark to avenge his father's death. He challenges Hamlet to a duel and they both end up dying.
3) The political situation in Denmark. The country is in a state of turmoil following the death of the old king. Claudius is a weak and unpopular ruler, and there is a threat of invasion from Norway.
These subplots all contribute to the main plot of Hamlet and create a complex and multifaceted play.