Well, you would have to perform chemical tests to be sure.
Some common ions, such as halide ions, copper ions, zinc ions, and ammonium ions can be easily tested.
Halide ions will react with silver nitrate #(AgNO_3)# to give coloured precipitates of silver halides. For example, chloride ions will react with #AgNO_3# to give out silver chloride #(AgCl)#, which is an insoluble white precipitate.
Copper ions are usually in their #+2# state, and are blue in coloured solutions. To test for them, simply add some sodium hydroxide and a blue precipitate of copper(II) hydroxide #(Cu(OH)_2)#will form.
Of course, there are many other tests, and these are the basic ones.