Answer:
Step-by-step explanation:
By being close to an atom that will gladly take the electrons being offered.
Suppose you are talking about Be. It is in the second column. It has two outer electrons that can be given away. It will not give away one of the two remaining electrons because they are too close to the + nucleus.
Along comes a Fluorine atom. It has 7 electrons in its outer ring. The chemistry of the situation allows it to take on one of the two electrons Be is offering. It is all a matter of charges and attractions.
Another Fluorine atom will take on the remaining electron from the Be. The outer ring cannot take on more than 1 electron, but that is enough