An electric battery is a device consisting of one or more electrochemical cells that convert stored chemical energy into electrical energy. Each cell contains a positive terminal, or cathode, and a negative terminal, or anode. Electrolytes allow ions to move between the electrodes and terminals, which allows current to flow out of the battery to perform work.
Most boats are equipped with rechargeable batteries of some kind which can be discharged and recharged multiple times. Charging a battery typically involves running a current in reverse through a the charge, i.e. applying a voltage across the battery to create a current stronger than the battery current, so that the current flows from - to + instead of from + to - inside the battery.