Depending on how you wire a two battery 12 volt system the result can be a 12 volt system or a 24 volt system.
Charging 24 volt battery system.
If your charger is small enough to be carried aboard your boat you can leave these cables in place since the charging procedure requires it.
If your boat has a 24 volt battery system it probably has two 12 volt batteries that are wired together so that the negative post of the first battery connects to the positive post of the second battery.
The 24 volt charger is connected to the negative on battery 1 and positive on battery 2 inputting 24 volts to the series battery bank.
Some 24v systems actually employ a series of linked 12v or 8v batteries.