After you start your playthrough, you will get the second mission When Freedom Calls. One of the tasks here is to break into the security room that you see locked. Then you will start wondering where to find Bobby Pins in Fallout 4.
Fallout 4: Where to Find Lockpicks/Barrettes (When Freedom Calls)
It is a diverse item, often made of plastic or metal. Originally they were used to hold hair in place, but that was before the Great War. Now times have changed and they are used to open locks. But before we look at how to use them, here is how you can get your hands on them.
Bobby pins can be found as loot from suitcases, behind mirrors in the shrine and usually near locks. If you don't want to rely on RnG to get them randomly, you can always trade them with traders like Trashcan Carla and Trudy.
As mentioned, one of the first times you will need it is to enter the security room. Nearby is a cigarette machine where you can find it: