Spectator ions are those that do not change form when they combine to form a new compound. Spectator ions only play a part as either an anion or cation in the solution and are discarded in the final net ionic equation.
Ionic compounds are composed of negative anions and positive cations. When these compounds are formed, opposites are often used as spectator ions. Spectator ions are responsible for keeping the solution electrically neutral, while the player ions are the ones that undergo change.
When writing a chemical equation, all spectator ions are normally removed to condense the equation down to only reactive ions. For example, when combining silver and chloride, nitrate is paired as an anion with silver and sodium as a cation with chloride. After removing the spectator ions, which have undergone no change within the solution, the formula becomes much less complex. The resulting equation is called a net ionic equation, which is one that shows only the participating ions.
When writing out an equation, finding and eliminating spectator ions is quite simple, as they are always present in both the reaction and the product and can be removed by simply crossing them out from both sides of the equation.