A pesky little thing, the vampire bat spawns anywhere and everywhere with a light level low enough to spawn monsters...
Vampire Bats will, out of preference, target players, followed by villagers, pigs, and other animals. They will flap randomly until they sense a target nearby (and they can sense from a long way away), at which point they will try to reach and bite the target, causing damage.
The good news is that, alone, they are simple to deal with -- one tap from a decent sword will do it. The bad news is that they bring friends. Lots of friends. A whole swarm of friends to bear down on their unlucky target.