Bent molecular geometry of water
Your understanding is correct. The usual explanation given in introductory classes is VESPR theory. The oxygen atom has four bond-like "things" coming out of it. Two of those are the covalent bonds with the hydrogen bonds. The other two are the two lone pairs. VESPR theory calls this a steric number of four. 

The slightly more advanced explanation comes from molecular orbital theory. Oxygen's valence electrons are all $2\text{p}$ electrons; hydrogen's electron is $1\text{s}$. The only way to mix those orbitals to get enough bonding orbitals is by using two $\text{sp}^3$ hybrid orbitals to generate the two bonds. The $\text{sp}^3$ orbitals are arranged in a tetragonal geometry.