To hold a nail in place while hammering, without risking your fingers,
hold the nail sin place with a clothes pin while hammering the nail.
carefully hold the nail with your fingers while hammering it into the wall.