I remember when I used to do the old javascript onMouseOver and onMouseOut to get those amazing image rollover buttons to work. That was back when I had a 56k connection, and normally I rolled over a button and waited for it to load to see it's rollover state. Those days are long gone thanks to CSS sprites.
Basically, say you have one rollover button and want to have 3 states for it, normal, hover and active. You create 1 image file with each of these images in the one file. Then you specify (in CSS) what co-ordinates of the image to go to based on the mouse state.
So you have one image file loaded when the page is accessed, only one http request and less resource usage.
Here's the smashing magazine article explaining everything you need to know.