When you add a wire between the ends of the batteries, electrons can pass through the wire, driven by the voltage. This reduces the electrostatic force, so ions can pass through the electrolyte. As the battery is discharged, ions move from one electrode to the other, and the chemical reaction proceeds until one of the electrodes is used up. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.