When the battery is charged, the lithium ions in the cathode material (lithium compound) migrate via a separator to between the layers of carbon material that form the anode, and a charging current flows.
When the battery is discharged, the lithium ions in the carbon material that form the anode migrate via a separator to the cathode material (lithium compound), and a discharging current flows.