How does a water molecule bond to an anhydrous salt to form a hydrate?

Some sites suggest that water molecules bong to anhydrous salt via a "loose bond". What does that even mean? $\ce{H2O}$ is a polar molecule and salts are made up of ionic bonds. Is it a hydrogen bond between the anions and hydrogen atoms?

"Loose bond" is really a loose term which engenders loose understanding. The bonds that hold water molecules in the structure are usually dative bonds, which is a variety of polar covalent bonds. They are formed between water's O and the metal ion, using spare electron pairs of the former. There is nothing unusual about having covalent bonds in an ionic crystal. Think, for example, of $\ce{S-O}$ bonds in the sulphate anions within $\ce{MgSO4}$ or any other ionic sulphate.
Alternatively, in some relatively rare cases water molecules may be held by hydrogen bonds to the anions, like you suggested. This is the case with that fifth water molecule in $\ce{CuSO4\cdot5H2O}$, as explained by @ringo.
Water is often necessary in crystal formation, and in some cases is incorporated into the structure of the crystal. Though these waters of hydration can be removed by heating the crystal, some of the properties and structure of the crystal are lost. For the most part, water acts as a ligand in hydrates, surrounding the metal cation. The ionic attractions occurs between the coordination complex and the anions, and hydrogen bonds do occur between $\ce{H2O}$ molecules and the anions, like you stated.
$\ce{CoCl2.H2O}$, for example, exists as $\ce{[Co(H2O)6]^2+}$ and $\ce{Cl-}$. Water does not have to necessarily surround the metal, however. $\ce{CuSO4.5H2O}$, a very popular hydrate, exists as $\ce{[Cu(H2O)4]^2+}$ and $\ce{SO4^2-}$. Copper is surrounded by 6 oxygen atoms, 2 from the $\ce{SO4^2-}$, 4 from $\ce{H2O}$. The other $\ce{H2O}$ molecule is in the structure of the crystal, but does not bind directly to copper.