What makes an atom favor another one when bonding, and should there be enough atoms for both parts?
The answer to your question boils down to one thing, bond energies. When a bond is formed, energy is released. When a bond is broken, energy must be absorbed. Elements prefer to be in a low energy state, so if you just added H and O into a container, the reaction with the most negative net bond energy will take place. To calculate the overall bond energy of the reaction, the equation is:

$E_{total} $= (Energy of bonds broken) - (Energy of bonds formed). 

(As a side note, the answer is in joules of energy per mole)
For naturally occurring hydrogen and oxygen the bond energy is: 

$2H_2 + O_2 $ ->$2H_2O$

= $(436*2 + 493*1)-(463*4)= -487 \frac{kj}{mol}$

(2 H-H bonds broken + 1 O=O bond broken) - (4 O-H bonds formed)

This reaction is favored and would occur under typical conditions if oxygen was in the presence of hydrogen and would release -487 joules of energy per mole. The bond energies for each bond can be found by simply looking them up online. The bond energy for the formation of $H_2O_2$ I calculated turned out to be -149kj/mol. Therefore the formation of $H_2O$ would be favored over $H_2O_2$. In your question, you asked about single O and H atoms, not $H_2$ and $O_2$, which would not occur naturally, but is still very possible. This result however would be the same. The atoms would first bond to form $O_2$ and $H_2$, then would proceed to form water as noted above.

Finally, to answer your last question, if there is one hydrogen and one oxygen left, they will indeed bond to make an $OH$ molecule.