This quest becomes unavailable if you convinced Dr. Madison Li in returning to the Brotherhood of Steel and you've come so far in the Brotherhood questline where you have already helped rebuild Liberty Prime. Also, if you have completed the Railroad quest Rocket's Red Glare, this quest will be skipped since it will also end in Prydwen getting destroyed.
To start this quest, you have to progress far in the Institute storyline up until End of the Line. Talk to Dr. Watson or Dr. Li who then will refer you to Rosalind Orman to get more details about the quest.
After getting brief about the plan, you'll be relayed to the Airport. Fight your way to the generators. For each generator destroyed, more synths will be able to be relayed in as reinforcements. You'll also need to protect the synth carrying the virus so it reaches Liberty Prime and upload the virus. After getting rid of the generators, climb up to Liberty Prime and access the head so that the virus synth can start working. Take note that while the synth is uploading the virus, the BoS forces will just keep on spawning.
Near the completion of the upload, Elder Maxson himself will attack aboard a vertibird. If you want to get his Elder Power Armor and unique weapon, Final Judgment, you have to destroy the vertibird first / snipe its pilot to make it crash and force him to fight on the ground.
When the upload is complete, Liberty Prime will Power up and bring down the airship using its devastating laser eyes. You'll be relayed in a short distance to safety and also giving you the majestic view of the fiery wreckage. The quest will be completed automatically shortly afterwards.