When a player kills another player, the player who died drops their own head, with their skin on it.
Deaths to mobs, pets, lava, falling and other things don't drop a head.
Mob heads
Zombies, skeletons, creepers and piglins killed by a player have a 2.5% chance to drop their head. Looting raises it: 3.5% with Looting I, plus 1% more for each level after that.
Tip Wither skeletons drop their skulls the normal way.