|MadSci Network: Chemistry|
You ask a very perceptive question. Hydrogen and oxygen do in fact react in this case to form water, so you got that part right. Where I think you might be a little confused is in what we mean when we say something is burning.
By definition, any time a chemical substance reacts with oxygen it is said to be burning. Therefore, in a rocket engine using hydrogen and oxygen as fuel, the hydrogen is what is burning, since it is reacting with the oxygen. In this reaction, the only product is water vapor. So the water doesn't burn, but the hydrogen does.
Incidentally, an interesting question (and probably the fact that led to your confusion) is why the shuttle carries liquid oxygen in addition to the hydrogen fuel. The answer is that, while there is plenty of oxygen at ground level to burn the hydrogen without needing any extra, at higher altitudes there is less and less oxygen available. Outside the earth's atmosphere, there is none available at all. Therefore, to ensure there is always enough oxygen on hand to burn the necessary hydrogen, they carry their own supply.
I hope this helps answer your question.
Try the links in the MadSci Library for more information on Chemistry.