When an atom combines with another atom or atoms forming an ionic compound, electrons, protons, and neutrons become redistributed.
A sulfur atom gains two electrons.