Battery chargers can be simple or complex depending on the objectives, features and flexibility desired. There is tons of information available if you would just search for it. Data sheets on battery charger ICs give lots of background information as well as specific device information.
Your question on how to stop a charge on a lead acid battery is pretty simple, most chargers will work as a current limited charger but will monitor the battery terminal voltage as it accepts the charge. When the battery terminal voltage reaches a predetermined setpoint, say 13.5VDC, the circuit will switch to a constant voltage charge of say 13.6VDC which will allow only a small trickle charge to remain, keeping the battery 'topped off'.
Different battery types (chemistry), ni-cads, ni-mh, etc all require different charging strategies and there is no substitute for educating yourself if you are going to design you own.
Good luck
Lefty