It's not possible using HTML alone, you have to also use JavaScript or CSS. Here is an example using JavaScript that I use on MPSounds.net:
code:
<img name="search" src="images/search.gif" alt="Search SoundPacks" onmouseover="document.search.src='images/search2.gif'" onmouseout="document.search.src='images/search.gif'" border="0"></a>