Electronegativity is the tendency of an atom to attract electrons in its outer shell (remember, electrons give away or take away happens only in the valence shell). This tendency is higher for non-metal and lowest for metals. That's why metals are generally electro positives, and non-metals are electronegative. The tendency is lowest in metals because metals reside on the left side of the periodic table; that is why their valence shell contains 1,2 or 3 electrons in most cases, which makes it easier to give electrons rather than take electrons (to achieve 8 electrons in the outer shells). Whereas non-metals reside on the right side of tables, from group 14 onwards mainly, which means non-metals have 4, 5, 6, 7 electrons, which allows them to accept few electrons rather than donating electrons to achieve 8 electrons in the outer shell. Naturally, as electrons are negatively charged, this addition of electrons makes them electronegative. So, as we go towards the right side of the table, electronegativity increases because electrons are getting more and more filled. However, down the group, electronegativity decreases because of the increasing number of the shell. As the number of shells increases, the valence shell locates far from the nucleus. Therefore it's difficult for the nucleus to attract more electrons in the outer shell.
Fun fact: Whatever trend we see left to right in the periodic table, the opposite trend is noticed down the group, be it the size of an atom, electron affinity electronegativity, metallic property etc.
Post your questions if any question is there.