Snape's story is, all things considered, pretty bleak. His home life was difficult, with his parents frequently at odds, and as a bright young child, he had nowhere to turn... except for his best friend and unrequited love Lily Evans. Bonding together thanks to their shared magical abilities — which drives a wedge between Lily and her sister Petunia — Snape and Lily become close before they head to Hogwarts, where they're sorted into different houses. While Lily ends up in Gryffindor, Snape finds himself in Slytherin, and those two houses are always at odds.
Things only get worse from there; Lily, a Muggleborn witch, hates Snape's pure-blood elitist friends, and Snape can't stand the boys who hang around Lily trying to impress her. Making up spells and excelling at Potions — a subject he would eventually teach at Hogwarts — Snape scribbled in the margins of his textbook, but unfortunately, his bully James Potter ended up using half of those spells against him, especially the ankle-dangling one.
Yeah — James Potter. Lily ends up marrying him, the two have Harry, and Snape watches bitterly from the sidelines as his high school enemy gets the girl.