You need to demultiplex the audio and video, that is separate them into separate files. There are several good programs that can do this, but most of them are command line. Mplayer can do it, and transcode includes some tools that can do it also.
Once you have the audio track separated, you can decompress it into .wav format and edit it as you want in Audacity or some other program. Or create a new audio track of the same length to replace it. Then you simply recompress the final version back down into a compressed file and multiplex the audio and video back into a single .avi file, reversing the original process.
An .avi file can hold video and audio tracks in several different formats, so I can't give you any more detailed instructions. You'll have to research how to use the tools yourself to do exactly what you want. Read the man pages and search around the web. There's a lot of good information out there if you look for it.