it can be done in photoshop...sort of...you put what you want to animate in layers and export it to image ready. Image ready can animate it. I'm not sure if the freeware. I have used gif animator and animation shop as well. They were easier than the image ready method...
my user bar done using the photoshop/image ready method.
Back in March I attended the CUE conference in Palm Springs, and went to a session by the Orange County Animation Project. Even though the conference was geared toward education and teaching animation to students, the programs they use and demonstrated can be used by anyone.
Unfortunatly I haven't had any time to play around with it myself, (except to animate my userbars), but here are some sources to get you started.
For 2D animation, you can use GIMP, which is an open source program that is both PC and Mac compatable and can be downloaded at www.gimp.org.
Macromedia Flash is used by some people, but only has something like a 15 day free trial, and even the basic version is $400.
I use a lot of Macromedia products because of my work. Fireworks is also great for creating animated gifs (like the one in my sig), but I can't recommend that any more than I could recommend PhotoShop since they're both expensive programs (although FW is the cheaper of the two by far).
I used to be a big fan of Paint Shop Pro. Don't know what their product is like nowadays, but they used to bundle an animated gif maker in with it. I haven't investigated freeware programs cuz I have no need.