How does a battery recharge?
The method of charging a battery while being effective but without doing damage varies with battery chemistry.

Since you have a "12V" battery, I'm guessing it is a lead-acid type like you find in cars.  Lead acid are fairly forgiving in how they can be charged, unlike other chemistries, especially certain types of lithium.  Basically charge a lead acid with power that is both current and voltage limited.  The voltage limit is usually 13.6 V for car batteries.  The maximum current depends on the size of the battery.  A ordinary car battery can take several amps easily.  For example, a power supply that is limited to 5 A and 13.6 V will work just fine to charge ordinary car batteries, although that's not pushing the maximum allowed current.  That means it will drop the voltage to not exceed 5 A or drop the current to not exceed 13.6 V, whichever is lower.  Hardware and automotive stores sell chargers for car batteries that have all this built in.  The only gotcha is a charger advertized as "fast" may abuse the battery.  A full charge should take a few hours, although most of the time the battery should not get low enough to require that.

If your battery is smaller, then you have to dig up its datasheet or somehow get specs for it and make sure the charger doesn't produce too much current.

If your battery is not lead-acid, then things could be quite different.  In that case you really have to get the specs, which should include the required charging profile.  Getting this wrong, particularly with some types of lithium, could result in pyrotechnics.