Well, if I understood you correctly you are talking about an image kind called GIF. You will need a special program such as GIFAnimator to put several GIF pictures together like that.

JPG pictures are the most common pics there and GIFs are second.

My avatar is a GIF for example, and so are almost all moving pics (such as the smilies here and so on).

I could email the GIFAnimator program to you if you'd like to try it out, or maybe someone else here has an easier option to make GIF images?

EDIT: Ooops, I didn't see your responses Randi, Casper & Kitty before I wrote this *feels stupid*