A shirt stud is a decorative fastener that fits onto a buttonhole on the front of a pleated shirt, or onto the starched bib of a stiff-front shirt. Such shirts have special buttonholes solely for shirt studs.
Dress code of the modern western world reserves shirt studs for men’s formal wear and some semi-formal occasions.
In the western world, shirt studs were first used in the mid-19th century, when some shirt fronts were too stiff to close with buttons. So remains the case for the heavily starched, modern full dress shirts worn with white tie.