The potion that Snape prepared and gave to Lupin was the Wolfsbane potion that can counteract the effects of being a werewolf when taken. Professor Albus Dumbledore ordered Snape to make this potion and give it to Lupin, whenever the full moon day came close as Lupin was in fact, a werewolf.