Linus Pauling in his book “the nature of the chemical bond” defined electronegativity as “the power of an atom in a molecule to attract electrons to itself.”

As you go from the bottom left to the top right of the periodic table you are going from less to more electro negative. So as you go from bottom to top of the periodic table you’r increasing electronegativty, and as you go from left to right on the periodic table you’re increasing electronegativity.

Large atoms tend to have a low affinity for electrons because the electrons are a long way from the nucleus which has a positive charge

LEWIS DOT STRUCTURE

When atoms react with each other to receive eight electrons in the outer most shell it is called the octet rule. Elements like oxygen have six electrons in their outermost shell so need another two electrons to complete the octet rule hence we get molecules like water