PetBat mod allows you to tame a bat that will accompany you and help you fighting mobs.

To do so you need a wild bat (found in caves) and a pumpkin pie.
Right click with the pie on the bat to tame it.

It will be given a name, that you can change by taking the bat into your inventory if you left click it when it flies around.
Also, to bring the bat closer just click around you with the pumpkin pie (works with untamed bats, not sure about tamed ones)
You can then rename your bat and launch it again, or keep it in hand to get night vision when you hold it (quite useful)

The bat gains experience as it fights mobs, and also takes damage or/and gets weary, so its health bar goes down.
To heal the bat either throw a pumpkin pie on the ground, that the bat will eat, or put it in a crafting table together with the pie.

The bat can gain up to 6 levels, each one giving it new abilities.
At level 3 it gains a 33% lifestealer ability, and at level 6, it shines like an enchanted item (and kills mobs really fast)

The bat doesn't take damage from zombies, thus a zombie spawner is a perfect place to train it.