In this post, I'm going to end my discussion on Animations in ASP.NET AJAX by showing you how they work, internally. At the end of this post you should not only know how Animations work, but also how ExtenderControl's work in general.
What is an ExtenderControl?
An Animation is actually just an ExtenderControl, so it will do us some good to understand what an ExtenderControl is all about.
ExtenderControls are script controls that apply a particular feature from ASP.NET AJAX to an already existing ASP.NET (non-AJAX) control. For example, if you wanted to apply some cool, new feature of ASP.NET AJAX to a standard radio button control, you'd do so through the implementation of an ExtenderControl. Extender control's work by emitting JavaScript that is attached to and extends functionality of an ASP.NET control. You will always need to reference the control to which you are applying the extender because it will need to know which control the emitted script should target. The key thing to remember is that it's an ExtenderControl is an auxiliary to an existing control, and typically the extending features are done through JavaScript.
Exactly how does the script emitted by an ExtenderControl become attached to the target ASP.NET control? Script becomes successfully attached to pre-existing controls through the runtime execution of the ScriptManager on the server, the use of a type known as the ScriptDescriptor, and the bootstrap client-side code of ASP.NET AJAX on the client.
On the server, the process looks something like this

The process starts when the ASP.NET runtime asks the ScriptManager (a native, server-side control) to render itself out. The result of doing so causes the ScriptManager to ask every control that has attached itself to the ScriptManager to render itself out too (an Animation, being an ExtenderControl, is therefore asked to render).
A script control is a special, new type of control introduced into the ASP.NET AJAX framework as a control that relies heavily on the scripting facilities of ASP.NET AJAX. One of the important features of a script control that sets it apart from other controls is that it has a great deal of functionality that must be executed on the client (through JavaScript) for it to function properly. A script control is responsible for giving all scripts and script types it requires to operate to the ScriptManager when it renders; doing so guarantees that the script will be included in the page output and therefore included in the rendered page.
Script controls hand off all the necessary script and script types to the ScriptManager as nicely packaged objects known as ScriptDescriptors and ScriptReferences. We’re more interested in ScriptDescriptors, however, as they are the layout for the JavaScript types and so (if you refer to the diagram above) you see that our extender control (when asked to render) calls back into the ScriptManager to register all its types. Doing so finally calls into ScriptDescriptor.GetScript() which returns back a block of script leveraging the $create() shortcut method and a series of JSON-formatted data.
When the ScriptManager renders, then, it guarantees that the JSON-formatted data of the control will be instantiated and initialized on the client through the $create() method. How? Because the ScriptManager will wrap the output of GetScript around the Sys.Application.add_init() javascript method. Add_init() actually attaches code to the initialization script of ASP.NET AJAX’s client libraries; this guarantees that, when ASP.NET AJAX is fully started up on the client when the page has fully loaded, your initialization routine will be called. What the initialization routine does, however, is up to you.
How Does an Animation Work?
You're 90% of the way to understanding Animations now. All that's really required is a bit of a filler-explanation for what, specifically, the Animation extender control is doing.
On the server the Animation control will take your XML markup and create an in-memory Animation object instance representing all of the properties and child/parent associations. Since an Animation is an extender control, the ScriptManager will ask it to render. The result of the Render call will be the JSON-formatted version of the Animation object from the server (property values, event-handling code and all). Just like above, the JSON-formatted initialization code will be wrapped around a Sys.Application.add_init() script method so that it will be executed when the page is loaded on the client. This is an example of what the output looks like:

…this is actually the result of a view source on one of the animation examples on www.asp.net. There is a lot of code here, but if you squint carefully you can see it all starts with a Sys.Application.add_init() call. Also if you look carefully you’ll see that it’s actually instantiating, on the client, an object of type AjaxControlToolkit.Animation.AnimationBehavior.
The AnimationBehavior Object
If you recall from earlier discussions about Animations, there are actually many instances where multiple animation effects (a fade out, or a color change) can occur in sequence as the result of a single event (onclick). Each animation effect is actually an Animation object, and the object that surrounds each Animation (to make them happen in sequence) is also an Animation object – so we have Animation objects housing multiple Animation objects. This can be confusing when rendered out to the client, so the ASP.NET AJAX client framework wraps all the animations that need to be rendered to the client for a single Animation extender as an AnimationBehavior object. The AnimationBehavior object is what gets instantiated on the client and has its initialize() method called.
The initialize() method of the AnimaitonBehavior object will inspect which events need to be registered (OnClick, etc) and attach event handlers to the target control on the page (the client-side control which we’re extending). Whenever that event occurs on the client, the event handler for the AnimationBehavior will be called and it will route that event to the proper Animation object. Here is an example of the AnimationBehavior’s OnClick event hander:

…which, after a bit more traversing the internals of the script library, plays the Animation.
How does the Animation object actually play the animation?
It may seem like somewhat of a mystery when you declare XML on your page that then translates into some dynamically updating DHTML object, but if you think carefully about what it take to animate a DHTML object the mystery subsides.
All that it takes to animate something on your page is a timer ticking at a regular interval whose callback method updates some DHTML object property (x- and y-position, for example). And that’s all an Animation object is on the client – just a fancy timer that updates properties with values you specify; invoking the play method above simply starts off the timer, and thus the DHTML effects. Therefore all that’s needed within the JSON data is enough information to identify what property you’re updating on what object, at what interval, and with what values – the existing script of the Animation object will take care of the rest. If you look at some of the JSON-serialized data that is being rehydrated on the client, you actually can see just that information (take a closer look):

..and that’s how Animations work.