How can cellphones be charged and used at the same time?
Basically, the charging source, battery, and load are all connected in parallel.

If the charger supplies more current than the load requires, the excess current will be used to charge the battery.  

If the load requires more current than the charger can supply, the battery will supply the excess.

While it is true that you cannot charge and discharge the battery at the same time, it "looks like" you are doing so, as the battery will change between charge and discharge automatically as the load demand or charging supply vary.