Animating icons is like creating a cartoon or a movie. In a cartoon, millions of drawings are used to create minutes' worth of animation. Likewise with a movie, pictures are taken at incredible speed and then played one after the other, making moving pictures. To animate an icon you must first have made all the frames to your moving icon. You must not use too many frames or your icon will be too big to used on AIM.
You need to download an animating program. I recommend Coffeecup 6.2 because it has a wizard that walks you through the animating process, which is especially helpful to beginners. Here is the link. The download and installation process are pretty self explanatory.
Here is my example:
Frame 1 ->
Frame 2-> 
And my finished icon.