You have to follow the “Freedom Trail” which starts in Boston Common. Head to the fountain and listen to the tour bot. To head to the next stop of the trail, you have to follow the line on the ground made out of red bricks. You’ll encounter enemies along the way as well.
Boston Common: Code 7A
Old Granary Burying Ground: Code 2A
Runs near Goodneighbor (Code: 6o)
Marker in front of Old Corner Bookstore (Code: 3i)
Runs around Fanueil Hall (Code: 5R “Trail”)
Paul Revere House (Code 8D, unmarked)
Old North Church (Code 1R, “Freedom)
The trail ends in the Old North Church. Once you're in the church, kill the ghouls there then follow the Railroad lantern signs until you reach the dead-end in the basement where you have to operate the rotating "The Freedom Trail" emblem.
The password is RAILROAD. For every selection of the letter, you’ll have to press the center button. Listen for a “clicking” sound and not a “sliding” sound. The clicking sound indicates that you’re entering the right letter. After entering the correct sequence, the secret door will open. Proceed forth and you’ll meet Desdemona, the leader of the Railroad.
During the conversation, the Railroad's leader, Desdemona will ask you if you're willing to risk your life for a synth. You can answer however you want but if you want to ally with this faction (or at least do some quests for them for convenience), I suggest sticking with the "safe" answers. Take note that if you leave the area without answering Desdemona's most important question, she'll order her men to attack you, making you an enemy of this faction .
Additionally, Deacon, one of the top agents of the Railroad will vouch for you, depending on your feats and progress in the story like being the leader of the Minutemen, killing Kellogg, or saving Stockton's "daughter" from the Compound. After the conversation, the quest will be complete and the next quest for this line starts immediately.