Understanding net ionic equations in chemistry requires first understanding ionic exchange reactions, and in particular, precipitation reactions. Ionic exchange reactions, including precipitation reactions, take place in water, referred to in chemistry as "aqueous solution." When an ionic compound is dissolved in water, it ionizes, which means that each molecule divides into two particles: a positively charged cation and a negatively charged anion. If two ionic compounds are dissolved in water and mixed together, the cations and anions have the possibility of switching places, which is called an ionic exchange reaction. This can be a deceiving explanation of what's going on in that water, though, because in reality, all the cations and anions in aqueous solutions are just floating around free in the water - unless a precipitation reaction occurs.
A precipitation reaction is one that forms a precipitate, which is collection of solid particles in an otherwise aqueous, dissolved solution. Consider the reaction between calcium chloride, CaCl2, and sodium carbonate, Na2CO3. Independently, the two substances dissolve completely in water. However, if you mix the two aqueous solutions together, a white precipitate appears and falls out of solution, settling to the bottom. That white substance is calcium carbonate, and it is formed by an ionic exchange reaction that looks like this:
CaCl2(aq) + Na2CO3(aq) -> CaCO2(s) + 2NaCl(aq)
CaCl2 is calcium chloride, and Na2CO3 is sodium carbonate; the "(aq)" following each means that it is dissolved in aqueous solution. CaCO2 is calcium carbonate, the precipitate, which is followed by "(s)" to designate it as a solid, undissolved in the solution. So what is NaCl, the other compound that is formed when you mix calcium chloride and sodium carbonate? It's sodium chloride, commonly known as table salt or sea salt. You probably know from experience that sodium chloride dissolves in water, so you should not be surprised that it does not fall out of solution, but remains in the aqueous state. You might also not be surprised to find that calcium carbonate does not readily dissolve in water, and therefore precipitates when formed by ionic exchange, if you knew that seashells are made primarily of calcium carbonate. When was the last time you saw a seashell dissolve in water?
So, what is a net ionic equation, then? Since the calcium chloride and sodium carbonate were dissolved in water before being mixed together, and since the sodium chloride stays dissolved in the end, all three are truly in ionic form throughout the reaction. The reaction could then accurately be represented like this:
Ca2+ + 2Cl- + 2Na+ + (CO3)2- -> CaCO2 + 2Na+ + 2Cl-
Ca2+ and Na+ are positively charged cations, floating free in the water at a ratio of two Na+ ions for every one Ca2+ ion. Similarly, Cl- and (CO3)2- are negatively charged anions, also floating in the water, with twice as many Cl- ions as (CO3)2- ions. As soon as calcium chloride and sodium carbonate are dissolved in water, the ions float free. Likewise, after the two solutions are mixed, the Na+ and Cl- ions continue to float free in the final solution, because they stay dissolved. Since the Na+ and Cl- ions are ionized in solution both before and after the reaction, and they remain unchanged by the reaction, one can infer that they do not actually take part in the reaction at all. Instead, they hang out in the aqueous solution and watch the other two ions, Ca2+ and (CO3)2-, reaction with one another. For this reason, the Na+ and Cl- ions are called spectator ions.
A net ionic equation is an equation representing the actual reaction that occurs during a precipitation reaction, leaving out the spectator ions. For the calcium carbonate precipitation reaction, the net ionic equation looks like this:
Ca2+(aq) + (CO3)2-(aq) -> CaCO2(s)
The spectator ions are not represented because they do not take part in the reaction. Only the ions that react with one another and the final precipitate are represented in a net ionic equation.