Severus Snape was a half blood wizard, his mother, Eileen Prince was a witch and his father, Tobias Snape was a muggle, with Snape being a half blood wizard and his mother's last name being Prince, he decided to give himself the nickname as The Half Blood Prince.
Since Snape was a half blood and Lily was muggle born it put his friendship with Lily under great strain, but their friendship was broken in their 5th year when Snape called Lily a mudblood and she never forgave him for that. And that was also Snape's worse memory.
Before Lily was killed by Voldemort, Snape became a member of the Order of the Phoenix and an agent during the Second Wizarding War.
Professor Dumbledore trusted Snape for all reasons that were kept between them both until their deaths. When Snape died it was revealed that his deep and strong love for Lily caused him to redeem himself, he started to join Professor Dumbledore 'cause of the prospect of Lily's protection from Voldemort.
After Lily's death, Snape made a promise that he'll do anything to protect her son, Harry Potter. He made that promise because of the love he had for her.
Snape knew where the real sword of Gryffindor was, so, he hid the Sword of Griffindor in the frozen water near Harry's campsite in Harry Potter and the Deathly Hallows Part 1, and Snape used his Patronus Charm to guide Harry to the Sword of Griffindor.
Before Professor Dumbledore died, Snape promised to protect the students of Hogwarts from the Death Eaters, since they would do anything to take control of Hogwarts and the Ministry of Magic.
Snape participated in the Battle of Hogwarts, but, later he was killed by Voldemort because Voldemort believed that Snape was the master of the Elder Wand, which the Elder Wand was a strong and powerful wand that Voldemort wanted it desperately but in reality, Draco Malfoy was the master of the Elder Wand since he was the one that disarmed Professor Dumbledore.
19 years later you see that Harry Potter has a son named Albus Severus Potter, he told his son, "You were named after two headmasters in Hogwarts, one of them was a Slytherin and he was the bravest man I've ever known".