If the creature is an illegal target when Sip of Hemlock tries to resolve, it won't resolve and none of its effects will occur. The creature's controller won't lose 2 life. However, if Sip of Hemlock resolves and the creature isn't destroyed (perhaps because it regenerated or had indestructible), the creature's controller will still lose 2 life.
Random a card of Magic: The Gathering (MTG), but you can also roll the D20 dice, random a Planeswalker, have fun with the random rules and more.