NASA's Perseverance rover successfully used its MOXIE (Mars Oxygen In-Situ Resource Utilisation Experiment) instrument to convert carbon dioxide from the Martian atmosphere into oxygen.
According to Nasa, MOXIE itself cannot produce enough oxygen to make a difference for future exploration efforts. For example, launching four astronauts off the Martian surface would likely require about 7,000 kg of rocket fuel and 25,000 kg of oxygen. MOXIE produced 5.4 grams of oxygen, about enough to keep an astronaut breathing easily for 10 minutes, while each astronaut will need a ton of oxygen to survive for a whole year.
The good news is that the extremely thin atmosphere of Mars (100 times thinner than Earth's) is consisted entirely of carbon dioxide (CO2), and with the appropriate equipment, oxygen could be generated faster and more efficiently in the future.
MOXIE works by separating oxygen atoms from carbon dioxide molecules, which are made up of one carbon atom and two oxygen atoms, then carbon monoxide is emitted into the Martian atmosphere. In the future, NASA will produce a new version of MOXIE, which will generate a larger volume of oxygen, without being given further information on the issue.