There are several methods for animation in web design, a few of the more prominent methods include flash, css3, and javascript (canvas, webgl).
Here I just want to show you a great example of each:
While flash has fallen out of favor over recent years it is still an incredibly powerful animation tool, and in some cases it is the only animation method that can get the job done. Check out the FWA website for many examples of flash on the web.
CSS3 animations are still relatively new, currently only the latest Firefox and Webkit browsers support CSS3 animations. Here is an example of a animated stick man skating which was created purely with CSS.
The HTML5 Canvas element is fairly well supported, it works in pretty much all modern browsers (note, it is not supported by ie8 and down). Here is a beautiful example of what happens when Canvas is use to create art.
WebGL brings 3D graphics to the Web, it is currently support by Firefox 4.0 and up, Chrome, Safari nighty build, and Opera 11 preview build. To see an amazing example of WebGL in action check out the Rome project.