The battery charging animation is usually a series of images, displayed in the status bar. Assuming that you are talking about them (the images in the status bar), they are animated when an event is broadcast. Giving some more detail, whenever a charger is connected, an intent is broadcast, which is received by the SystemUI to animate the status bar's battery indicator image.
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile