Bandages are used to stop a wounded player from bleeding. They are one of the most common, yet most valuable items in the game. They take up one sidearm ammunition inventory slot. Players spawn with only one bandage, but can easily find more in nearly any loot spawn.
Bandages are used by opening your inventory ("G" by default), finding the bandage, right-clicking on it, and selecting "Bandage myself". Note that the bleeding doesn't stop until the player's character finishes the bandaging animation, so it's important to start bandaging as soon as possible to minimize blood loss. If you interrupt the bandaging animation by moving, the bleeding won't be stopped. However, being hit by zombies won't interrupt it.