This question already has an answer here:
Snape is a triple agent. He sided with Dumbledore because Voldemort killed Lily, the only person who Snape loved and cared. Snape was a spy among the Death Eaters and was giving information to Dumbledore. Why is Snape always bullying Harry and Neville, since Snape has a reason to protect Harry? Did Dumbledore know this? If so, how did Dumbledore react to this?