Dell PC freezes once starting up

Everytime I start my dell desktop it freezes for about 20minutes then it runs for a few minutes then freezes again it's really hard to do anything on it I don't know what the problem is before this happened a few days ago my friend went to start up and went to run and put msconfig then he changed around the startup and made some things not start up with the PC such as aim AOLLaunch, AOL, AOLDial, AppleSyncNotifier, LogiTray, XCleaner_free, Logitech Desktop M... and Logitech Harmony...
I have no clue what the problem is can anyone please help? (there are logins and one of the logins it takes a few more seconds to freeze) By going to all programs and looking at the programs it will just freeze and take about 20mins before it resumes for a few more seconds then freeze.

Model. Hard drive? OS?
It is a slow and frustrating process to track down and fix this problem.
I would start by replacing the memory, or in lieu of that, removing one module and running it on the other memory module to test. Then switch.
Then scanning with Avast or Avira antivirus, then SuperAntiSpyware, then MalwareBytes... to see if there is an infestation.
It may be worth it to save your data and reformat the hard drive, getting a restore disk from Dell if necessary.
If it is older, clean out dust, dirt, hair, and fiber from the CPU and every port.
We need to know the model, OS, memory, and hard drive for additional suggestions.