Fifty years ago this month, Neil Armstrong and Buzz Aldrin became the first two human beings on the moon. Here's everything you need to know.

Why did we go to the moon?
On May 25, 1961, President John F. Kennedy told a joint session of Congress, "I believe this nation should commit itself to achieving the goal, before this decade is out, of landing a man on the moon and returning him safely to Earth." Kennedy framed the goal as part of a "battle that is now going on around the world between freedom and tyranny." In the Cold War between the U.S. and the Soviet Union, the space race had become a proxy for which country's economic system was better — capitalism or communism. In all, Project Apollo would cost $25 billion (about $174 billion in today's dollars), employ 400,000 people at its peak, and involve the efforts of 20,000 firms and universities. "Apollo was the biggest nonmilitary effort in the history of human civilization," said journalist Charles Fishman, author of a book on the program.

How did the project start?
When NASA administrator James E. Webb first asked Kennedy shortly after his inauguration in 1961 for enough money to pursue a moon landing, Kennedy told him no. But two events apparently changed Kennedy's mind. On April 12, 1961, Russian cosmonaut Yuri Gagarin became the first human in space — and also the first to orbit the planet. By comparison, American Alan Shepard's flight on May 5 was brief and suborbital. Five days after Gagarin's flight came the botched invasion of Cuba known as the Bay of Pigs — a personal humiliation for JFK that raised fears that communism was winning both the space race and the Cold War. "I'm sure it [the Bay of Pigs] had an impact," said Jerome Wiesner, Kennedy's science adviser. "I think the president felt some pressure to get something else in the foreground."

What were the first steps?
NASA quickly created a new mission control in Houston and a new launch facility on Merritt Island, Florida. Amid a frenzy of activity, a team of engineers led by former Nazi Wernher von Braun — who'd created the V-2 rockets that terrorized Britain during World War II — developed the Saturn series that would propel the craft. Meanwhile, the Russians launched their own lunar program, but it suffered a major setback when its chief rocket engineer, Sergei Korolev, died in 1966 during a botched surgery for hemorrhoids. So valuable was Korolev that the Soviets never publicly identified him by anything other than the title "glavny konstruktor" — chief designer — for fear the U.S. would assassinate him. "We had von Braun, and he built a rocket capable of a lunar landing mission," said John Logsdon, author of multiple books on the space race. Without Korolev, "the Soviet Union could not build an equally capable rocket."

What was NASA's approach?
Incremental — with each step advancing it closer to the goal. NASA conducted more than 20 crewed missions as part of Project Apollo and its two predecessors, Projects Mercury and Gemini. Apollo 8 flew to the moon, orbited, then returned. Apollo 9 linked up the command module and lander in Earth's orbit. Apollo 10 repeated the feat in lunar orbit. Finally, on July 16, 1969, Armstrong, Michael Collins, and Aldrin blasted off from Pad 39A at the Kennedy Space Center atop the Saturn V. They'd travel 240,000 miles over the next 76 hours and enter lunar orbit on July 19. On the 20th, Armstrong began piloting the Eagle lander toward the lunar surface while Collins remained in orbit above. Collins later confessed he harbored a "secret terror" he'd be forced to leave his comrades behind. "If they fail to rise from the surface, or crash back into it," he wrote, "I am not going to commit suicide; I am coming home, forthwith, but I will be a marked man for life and I know it." In case of disaster, White House speechwriter William Safire wrote a contingency address for President Nixon. "Fate," Safire wrote, "has ordained that the men who went to the moon to explore in peace will stay on the moon to rest in peace." Nixon never had to say those words.

Did the mission go smoothly?
No. Amid a computer malfunction, Eagle overshot its landing area by several miles, forcing Armstrong to manually search for a smooth spot. Fuel ran short. His heart rate spiked to 156. Finally, at 4:17 p.m. EDT, the lander touched down. "Tranquility Base here. The Eagle has landed," Armstrong said. Inside, he and Aldrin waited about six and a half hours. At 10:39, Armstrong opened the hatch. A camera beamed the scene to some 600 million people back on Earth watching on live TV. At 10:56, he stepped foot on the surface and famously said, "That's one small step for man ... one giant leap for mankind." Aldrin followed 20 minutes later and described the lunar landscape as "magnificent desolation." After Apollo 11, NASA made five more crewed landings on the moon over the next three years. But the final three planned Apollo missions were canceled due to budgetary restraints — and lack of public interest.

Going back to the moon
NASA intends to return to the moon — but the question is when. In March, Vice President Mike Pence announced the Trump administration had ordered NASA to return American astronauts to the moon within the next five years "by any means necessary." But Project Artemis, as the new moon mission is known, faces major obstacles in meeting that deadline. NASA's new rocket — the Space Launch System, or SLS — is not scheduled for a test flight until 2020. Plans call for the construction of a platform in lunar orbit from which astronauts will descend to the surface, although much of the necessary technology does not yet exist. NASA must also build a new lunar lander and create new space suits. Oh, and the space agency must wrangle from Congress the additional $4 billion to $6 billion annually it'll need to accomplish the goal. "A lot of things have to go right," said NASA Administrator Jim Bridenstine.