A computer friend of mine said I may have a worm.
Any idea how he verified that? Or did he just pull a scary sounding phrase out of the air?
That I know of, there's only one piece of malware for the Mac that could be classified as a worm, and that's Oompa-Loompa (known under various names). It spreads via iChat by actively looking looking for other iChat users, in your list of users, via Bonjour, which is its worm characteristic. Once it finds one, it pops up a message on that user's Mac to enter their admin name and password to install itself on the newly found Mac. So if you've never allowed a program to install, which asked for your admin password from out of nowhere, you don't have it.
Getting infected with Oompa-Loomps is actually fairly difficult (unless you're the type of person who installs anything that asks). A year or so ago, the number of people who were verified to have Oompa-Loompa on their Macs was a grand total of 50. And that was after it had been a know piece of malware for at least 2 years.
So, I seriously doubt you have any kind of worm on your Mac.
The computer keeps telling me that my webpages are not responding. And its getting worse. Any ideas?
Yes, reset Safari. With Safari in the foreground, go to the menu bar at the top and select Safari > Reset Safari. Turn on all check boxes, with the exception of Remove saved names and passwords, so you don't have to enter all of those again as you visit sites you had set up to remember that data.
He also said I may have to defrag my system.
That won't do a darn thing in relation to your issue. It's rarely even necessary to do that in OS X.