How is the typical laptop's battery (multi-cell Li-Ion) and external power interfaced ? What all components go into designing that circuit ?
The required behavior is:
When power cable is connected in DC Jack, the battery starts charging and the laptop starts running on the external power.
When power cable is disconnected, laptop starts using batteries power.
Stopping the battery to charge after is has been fully charged.
I know that DC jack has a third terminal which gets disconnected from ground the power cable is plugged in, I could imagine it's use in switching between battery and power supply but How should you charge the battery ?
The battery pack literally charges itself. There is a MCU or battery monitor chip in the battery pack which monitors both the "external voltage" (which is actually the laptop's internal power supply regulated by the power circuitry) and the voltage on the cells. A pair of MOSFETs are used to control electricity both into and out of the cells. They allow both overcurrent (during use) and overvoltage (during charging) protection via the MCU/chip. They also allow connecting the cells to the power supply if the external voltage drops below a certain threshold as measured by a ADC.