Talk to Daisy in Goodneighbor and ask for work. She’ll ask you to clear the Boston Public Library for 200 caps. You can haggle for more as long as your charisma allows you. Once you accept the task, this quest will become available. She’ll also give you an overdue book which she’ll ask you to return to the library.
The street entrance of the library is Advance-locked. The alternate entrance, Copley Station beneath the library has the same difficulty as well. Copley station has several supermutants inside
(From the street entrance)
Deposit the overdue book(s) in your possession to the book return terminal to your immediate right. The terminal has an issue of Massachusetts Surgical Journal as a prize. You need 50 book return tokens or 10 overdue books to surrender for you to redeem it. There are several overdue books in the library alone so if you have collected them before, you should have enough to get it. Otherwise, come back again and clear the library the second time around when its contents are "reset".
Once done, you have to clear the entire place of supermutants. The hall to the north has hostile machine gun turrets with friendly protectrons. However, if you destroyed the turrets, the protectrons will turn hostile all throughout the building.
Clear the northern hall and look for the terminal behind the pile of shelves and desks to get the Library Storage Key and bobby pin boxes. Open the door behind it to get the Intelligence Bobblehead. Use the Library Storage Key on the white door behind the Curator’s corpse to find a steamer trunk, stealth boy, and other lootable containers.
The filing room in the far eastern wing has a chem station and cabinets with components. NE corridor leads to the stairs leading to the lower portion of the library. The hall connecting the room with the stairs and the western wing has a chained door. Unchain it and open it if you want. There’s also a novice terminal in that room which you can use to deactivate the turrets and protectrons. The stairs Lead to the Copley Station.
After clearing out all supermutants (including the ones in the train station under the library), return to Daisy to complete the quest and get your reward.