Whereas a compressor reduces the dynamic range of a signal (making the quiet parts louder, and the louder parts quieter), an expander's job is to - wait for it - expand the dynamic range of a signal (push down the levels of the quiet material and push up the level of the louder material). Simple enough. But why would you want to do this?
Let's say you have a rhythm guitar track you've recorded. The performance is great, but the recording is less than optimal with quite a bit of noise in it. An expander, with the right settings, will reduce the level of the quiet signals (ie the noise floor), while making the parts you want (the guitar) louder. The end result is, your recording doesn't sound as obviously noisy as before. The noise is still there, it's just that it's masked by the loudness of the guitar when it's playing and suppressed when nothing is playing.
Expansion isn't a miracle worker, though. If you've got a drum loop that is completely smashed into oblivion with clipping or a limiter, you're not going to be able to restore it to its pristine, original state. Signals that have been compressed to a lesser extent may be able to regain a slightly more transient-centric sound, but there are limits to what it can really do.
Nowadays, with softsynths that can be bounced directly to audio without ever leaving your computer, noise is less of an issue, and expansion is probably on its way to becoming more or less obsolete - especially with all the transient-shaping plug-ins that do a better job of breathing life back into over compressed signals. But in the right circumstances, expansion can be a really valuable tool to have at your disposal, and as far as I'm concerned you can never have too many tools.