Here's a breakdown:
* Air: The Apollo astronauts wore spacesuits with a self-contained life support system that provided breathable oxygen. They carried tanks of oxygen on their backs and the lunar module had a larger oxygen supply for use inside.
* Water: They also carried water in special containers. Water was essential for drinking, cooling the spacesuits, and for various other functions within the life support system.
The Moon has no atmosphere to speak of, and the water on the Moon is mostly locked up in ice at the poles. While there are ongoing research projects to explore potential ways to extract water from the Moon in the future, the Apollo astronauts had to rely on what they brought from Earth.