( ( When ( ( an atom ) ( ( ( gains or ) loses ) electrons ) ) ) ( , ( it ( ( becomes ( ( a ( charged particle ) ) ( known ( as ( an ion ) ) ) ) ) . ) ) ) )
(ROOT (S (SBAR (WHADVP (WRB When)) (S (NP (DT an) (NN atom)) (VP (VBZ gains) (CC or) (VBZ loses) (NP (NNS electrons))))) (, ,) (NP (PRP it)) (VP (VBZ becomes) (NP (NP (DT a) (JJ charged) (NN particle)) (VP (VBN known) (PP (IN as) (NP (DT an) (NN ion)))))) (. .)))
When an atom  gains or loses electrons, it becomes a charged particle known as an ion.
(ROOT (S (SBAR (WHADVP (WRB When)) (S (NP (DT an) (NN atom)) (VP (VBZ gains) (CC or) (VBZ loses) (NP (DT an) (NN electron))))) (NP (PRP it)) (VP (VBZ becames) (NP (DT a) (PRN (-LRB- -LRB-) (NP (NN n)) (-RRB- -RRB-)) (NN ion))) (. .)))