
This is not an easy one to diagnose without more detail.
Usually, when a system locks up, one of the more commom problems is the system resources become too low. This occurs mostly on the internet.
How does you system perform with Avast running when you are not on the internet? Shut down Avast, and check your system resources: Right click on My Computer, then Performance. A good % is 80 before internet hookup. If you see it much lower, you have a program, or programs pulling it down.
Then with Avast running and connection to the internet, the system no longer has enough resources to run.
You can try to shut down other non-essential programs....leave Avast running and try connecting to the internet. See how it does. If it no longer freezes, then you may have to decide which programs you need to have running and which you do not.
Can't think of anything else to do right now based upon your info.
As a last measure, try to perform a DiskScan and Defrag to make sure things are at their best.
Good Luck