The compound being formed here is Lithium Fluoride, LiF. It is an ionic compound and is formed by ionic bonding between lithium and fluorine. Lithium has one valence electron, since it has an electronic configuration of `1s^2, 2s^1` and readily donates this lone electron to become the lithium cation (`Li^+` ). Fluorine, on the other hand, is one electron short of stable configuration. It has an electronic configuration of `1s^2, 2s^2, 2p^5` . It readily accepts an electron from a metal to form the fluoride ion, `F^-` . Thus, fluorine with 7 outer electrons and lithium with one outer electron, form an ionic bond with each other (with Lithium as the donor and fluorine as the acceptor) and we end up with the ionic compound shown in the figure through the electron dot formula.
Hope this helps.