Ions are atoms that have either lost one or more electrons (positive ions) or gained one or more electrons (negative ions). Collections of positive ions are known as cations, whilst collections of negative ions are called anions.
Ion-exchange filters use these positive or negative ions in a resin, which will attract and remove substances and replace them with other substances. A typical ion-exchange resin would remove substances such as nitrates or hardness, but only ever one substance, so to remove both, a dual cartridge system would be required.
Ion-exchange units are normally used to pre-condition tap-water for use either as drinking water or for aquarium use and many can be re-charged for reuse by passing saltwater through the unit.
There are often preferable alternatives to ion-exchange units for producing higher quality water, such as reverse osmosis water or pre-filtering through activated carbon.