The overall attraction of this process is called hydrogen bonding in water which have very powerful bonds. These powerful bonds are known as covalent bonds and are formed when electrons are shared by atoms.
The sharing of these electrons occur when hydrogen atoms share an electron + an oxygen atom. I hope I was able to satisfyingly answer your question. If you have any more questionings based on the information, let me know! :)