This is done with a bit of javascript and there are some Joomla plug-ins in the JED.
To start, Google SIFR and CUFON as the two more developed image replacement methods.
The Kernest project is close to ready for prime time, but still seems to have issues.
Each has benefits and issues so look at example pages to see which is best for you. I happen to use SIFR most of the time because it existed when I first needed to do this and so I have it dialed in. CUFON is easier, but riskier.
Once you have selected the technology, there are several Joomla plugins that will implement your selection by adding the appropriate javascript file plus a bit of CSS scripting to each page. If I recall correctly, Rocket has a couple SIFR templates in their demo area.