Pinball’s progenitor appears to be a French game of the 17th century called bagatelle. In bagatelle, wooden pins were placed at one end of a billiard table. Players shot balls with a cue from the other end at the pins. As resetting the pins took too long, they were eventually affixed to the table. Over time, holes were added to the playing field, becoming the new targets. Players scored by ricocheting balls off the pins into holes. More difficult shots received higher scores.
Over time, nails replaced pins, with the goal remaining the same: