Let us consider a tug of war.
A situation comes when neither side has pulled the rope completely towards it self but there is shift on one side. It is because there is more pull from that side.
Similarly, an atom attracts electrons or the density of electrons more towards itself because of its pulling power.Thus electronegetivity is defined as ability of an atom to pull electron towards itself.
To illustrate, let us consider the C="O" bond in a ketone. The electron density is more towards oxygen as electronegativity of oxygen is more than carbon. As such, the electrophilic additions take place at the oxygen and nucleophilic additions take place at carbon.
Electronegativity is not an abstract quality that can be measured independently. It is not the property of an atom in abstract but property of an atom in a molecule.
Rather it is a relative property which can be measured with reference to other properties.
In 1932, Pauling developed a method to measure electronegativity known popularly as Pauling scale.
It was developed from valence bond theory. Paulings scale places electronegativities of all the atoms in the range 0.7 to 3.98. These values remain same in any compound. Periodic tables have been prepared specifically with the electronegative values.The electronegativity depends on the atomic weight. More the atomic weight means more no.of electrons, thus more sheilding effect and obviously less the electronegativity.
It does depend on the size too. If the size of the atom is small, the nuclear pull towards the elctrons would be more, hence more electronegativity. As the size of atom increases in a group, the electronegativity decreases because of shielding effect.
Noble gases would have negligible electronegativity because of their configuration. Fluorine is the most electronegative atom. It is because of it's small size.One more reason for being so is that its electron configuration shows that it is short of one electron for attaining the stable configuration, as such it tries to attain that stability by trying to pull electron, resulting in highest electronegativity.
In a bond ,two atoms are bound by either donating-accepting or sharing of electrons.In a molecule like NaCl, the electronegativity difference between Na and Cl is quiet substantial,which allows the chlorineto 'snatch' the electron from sodium.Thus ionic bond is formed.
In a molecule having bond like C=O,the electronegativity of oxygen is greater than carbon,however not to that extent as would enable the to snatch the electron from .Thus the density of electrons in the bond is 'pulled ' towards oxygen giving rise to polar covalent bond.
In case of C-C bond,since there is no difference between the electronegativities of two atms,it is non-polar covalent bond.