Yes, water is turned into fuel and oxygen. In most places the water can be obtained from moisture in the air (there is much more water than CO2 in air, and we are already mining the air, so we can get both). In the process the fuel is separated from the water, which remains in the reactor, and is topped off as it is used to make the fuel. No waste water.