Direct current implies that there is a positive terminal (cathode) at one end of the solution and a negative terminal (anode) at the other end, depending on the way the battery is connected.
Now there is an electric potential established between the two terminals or plates. Hence, due to the electric field, the ions in the solution will travel towards the plates. Negatively charged ions in the solution will travel toward the cathode. Positively charged ions will travel towards the anode.
The ions will get deposited on the plates and then charge disappears. These ions may react with the metal on the terminal plates and form different compounds.
Hence the number of ions will get reduced in the solution. The concentration will decrease and hence the reactivity also changes.
Thus the composition will be changed. After a long time, the ions will all get deposited and the solution will not have any more. Then no current will pass.
If an alternating current source is connected, then the potential will change direction alternately. Hence the ionic composition will remain same. The ions will get generated, deposited and again they get dissociated from the plates. This will happen for some reversible reaction based ionic compounds. (rechargeable batteries).