How do black hearts function?
They are called soul hearts, and simply serve as a temporary HP boost, once you lose a blue/black heart, it's gone forever. Note that when you take damage, it will always subtract the damage from the blue/black heart(s) first.