My iPhone 4s keeps freezing? - 2

It was freezing when I was using the Facebook app, I then deleted the app and my iPhone froze up again. What can I do to unfreeze it? Someone suggested taking out the battery, but I'm not sure how or if it will be safe. Currently, I have to wait till my iPhone dies before I can do anything with it. Please help and give your suggestions. Also, is it possible my iPhone has a virus?

Yeah it's possible. 2 make the battery run out faster keep it on even if it's frozen 24/7 and when it dies charge it. That should help.

Restore it in itunes.
you can't take a iphone battery out

Iphones don't get viruses. Try a hard reset (hold the home button and the lock button at the same time until the phone shuts off, then turn it on again).