Downloading and installing a program like AVG is a good first step, but it's sadly not a case of "fire and forget". Here are a few tips to bear in mind:
1) Make sure you keep AVG updated. Run a FULL system scan say, once a week.
2) Supplement it with a program like Malwarebytes from
http://www.malwarebytes.org/mbam.php Another free program. Run a quick scan with this after you've run your weekly AVG scan. Again, make sure this is kept up-to-date.
3) Keep your Windows up-to-date by running WIndows Update from your "Control Panel".
4) If you use Internet Explorer, consider switching to an alternative free browser. Most other well-known browsers are lesser targets for attack and more secure as a result. Google fro browsers like Firefox, Chrome, Safari and Opera and decide which one you think you might like best. They're all completely free, so consider trying each one out for a while as it might help you decide.
5) Lastly there's common sense. Possibly the most important of all. Don't download stuff if you don't know exactly what it is. Don't open emails from people unless you know them and where they came from. If you're using a website and it doesn't look like you remember it, be cautious. Don't give out personal information online unless, especially bank details and the like unless you know exactly what you're doing. Sounds offensively simple, but the number of people who fall for old tricks is staggering!