Nails often creep out when wood expands and contracts because of temperature and moisture.
I've encountered protruding nails on the unshaded east and west sides of the house. When the creepy nails belong to me, first, I just drive the nail back in. If it sticks its little head out again, I pitch that nail, stick a toothpick into the hole, then drive in a ring-shanked nail. As the name implies, these nails have raised rings around the shaft. Once driven in, ring-shanked nails are in for keeps.