1. Check the symbols in the Periodic Table
Sodium is Na, Magnesium is Mg, Aluminium is Al, Sulfur is S, Chlorine is Cl.
NOTE THAT SULFUR IS SPELLED WITH 'F'.
2. Deduce the charge of the cation and anion.
(a) If it is in the main group, then follow these trends:
All Group 1 elements will have a charge of +1. All Group II elements have a charge of +2. All Group III elements have a charge of +3. All Group V elements have a charge of -3. All Group VI elements have a charge of -2. All Group VII elements have a charge of -1.
(b) If the cation is a Transition Metal (found between Group II and III) or if it is in Group IV, then the metal must have a number next to it. This is its charge.
Transition Metals:
Iron(II) is Fe 2+
Iron(III) is Fe 3+
Chromium(IV) is Cr 4+
Mn(VII) is Mn 7+
Group IV:
Sn(II) is Sn 2+
Sn(IV) is Sn 4+
(I trust you know that the charges must be in superscript, as seen in the picture below)
(c) If it is a polyatomic ion, you have to recall the charge from memory. It is not yet possible for you to deduce the charge by yourself.