The Hammering Shape Board (also known as a Hammering Geo Board) is an activity idea I picked up from our Montessori parent toddler class many years ago.
A toddler with nails? Yes. But supervise. I sit right next to Otis the entire time he does this activity. This tray is placed on his shelves but I keep the nails up high. If he wants to do the hammering he knows he needs to come to me first. Otis knows exactly how to handle them. The hammering is the difficult part as he is working on his coordination, often he misses the nail completely.
An older child will work with the shapes to create pictures and patterns but for a toddler, for Otis, it's all about getting that nail in the hole and hitting it with the hammer.