To replace MSE with Avast:
Download the Avast set-up file from here:
https://www.avast.com/en-gb/index
but don't run it straight away. (It will probably go into your 'Downloads' folder, inside your 'Documents' folder by default. If you're asked where to save it choose any convenient location, such as your desktop).
Then go to Start > Control Panel > Uninstall a Program
Click on 'Microsoft Security Essentials' and then on 'Uninstall'. Ignore any warnings about your action leaving your computer unprotected and just go ahead.
When you've done that, go to your Downloads folder (or wherever you saved the Avast set-up file to) and double-click on it. That will install Avast for you.
That's all you need to do but I'll add one little hint that stops Avast being annoying:
By default, every time Avast updates itself an American woman's voice informs you of that fact. That can be incredibly irksome, especially if she does it over something you're trying to listen to (such as the sound from a Youtube video or iPlayer programme).
To stop it happening, click on the Avast icon at the bottom right of your screen. (It's a yellow circle, with an 'a' inside it; you might need to go via the 'Show hidden icons' button to see it). 'General' will probably be pre-selected; if not, click on it. Then click on 'Sounds' and click to remove the tick alongside 'Enable Avast sounds'. Click 'OK'.