Imagine two children sharing a toy. If one child is bigger and stronger, the toy ends up closer to them — they are "hogging" it. Electronegativity works the same way with atoms sharing electrons in a bond. Some atoms are electron hogs, pulling the shared electrons closer to themselves, while others are more generous and let the electrons drift away. This tug-of-war over electrons is one of the most important concepts in chemistry because it determines what type of bond forms between atoms and how molecules behave.
Linus Pauling, one of the greatest chemists of the 20th century, created the most widely used electronegativity scale in 1932. On his scale, fluorine holds the crown at 3.98 — the most electronegative element, an absolute electron magnet. Oxygen comes in second at 3.44, which is why it is such a reactive element (think rust, fire, and breathing). At the other extreme, cesium and francium have electronegativities around 0.7, meaning they practically throw their electrons at any willing partner. Generally, electronegativity increases as you move right across a period and up a group in the periodic table.
The difference in electronegativity between two bonded atoms determines the bond's character. If the difference is small (like in H₂ or O₂, where identical atoms bond), the electrons are shared equally in a pure covalent bond. If the difference is moderate (like in water, where oxygen is more electronegative than hydrogen), you get a polar covalent bond — the electrons spend more time near the oxygen, giving the molecule a slight charge imbalance. If the difference is large (like in NaCl), one atom essentially takes the electron entirely, forming an ionic bond. Electronegativity is the compass that guides you through the landscape of chemical bonding.