You get this quest from Preston Garvey (the Minutmen). He will give you this quest when you see him (like any other quest from him), some time after the Quest where you have to clear out The Castle. He will ask you to go to the Castle again.
At the Castle you speak a former Minutmen and asks you to find a way into the Armory. After the conversation go in build mode, to remove debris that blocks a tunnel in the middle room on the other side of the Castle from where the Armory is. Now make your way through the tunnels into the Armory. Look out for mines on the ground.
Next you have to build an Artillery (you can place it on the wall above the Armory). After this you have to get the Artillery in use. You do this by going into build mode and if you approads a person you can command it to a certain task. There are a few Minutmen you can use or attract settlers. Some but not all Compainions can be used too.
Now throw a beacon in the desegnated area and watch the fireworks.