Hamlet and Horatio are both young men, and attend the same school, Wittenberg, in Germany. They are both very loyal characters. Hamlet is loyal to the love and memory of his father, and is doing his best to ascertain the veracity of the ghost's story, and then avenge his father's death. Horatio shows loyalty by keeping Hamlet's secrects: the appearance of the ghost, Claudius's guilt in the murder of King Hamlet, and Hamlet's surprise return to Denmark from the aborted trip to England.
Both men show concern for others. Hamlet is concerned about the morality of the court of Denmark and his mother in particular. Horatio shows concern for Hamlet's safety in Act 1 when he warns Hamlet to be careful in his meeting with the ghost, lest it do something to destroy him. In Act 4 he warns Hamlet to be careful going into the sword fight with Laertes.
Hamlet and Horatio both have a willingness to die for their causes. Hamlet resigns himself to his fate by the end of the play and says a version of, 'what will be will be' and "the readiness is all." He doesn't WANT to die in his attempt to avenge Claudius, but if he does, then that is what will be. Horatio is so upset over the impending death of Hamlet, that he takes up the poison cup and plans to drink the last drops in a show of despair and acknowledgement of the waste of this whole situation. Hamlet is able to talk him out of the act by reminding him that someone must live to tell the tale of what happened here, otherwise people will think a crazy Hamlet went on a rampage. His chosing to live shows loyalty to Hamlet and his reputation.
Their biggest difference is in their involvement and investment in the Claudius/King Hamlet situation. Horatio can sympathize with Hamlet's situation, but expresses caution. Hamlet has no choice to keep moving forward with his plans, such as they are, to prove Claudius's guilt and avenge his father's death.