This is a hasp. Basically an external lock typically used for bathroom doors.
This consists of 3 pieces. A male piece which has the pin (sliding nod) is to be bolted to the door through its 4, 1/4" OD holes. The female piece, where the pin inserts, is to be leveled with its counterpart (the male pin)and bolted onto the wall. The pin can then slide into and out of the female slot to lock or unlock a foor