How do bonded atoms become partially charged?

Due to the difference in the electronegativities of the bonded atoms, the more electronegative atom attracts the shared pair of electrons towards itself, which increases the negative charge density around the attracting atom, consequently the other atom has less negative charge density and thus a positive charge density (relatively positive) gets generated at the donor atom.