Does my iPhone 4 have a virus?

It freezes every time I unlock it and when I try to listen or download music. I have tryed resting it and doing a hard rest set but it still does the same thing over and over again

Did you jailbreak your iPhone?

There are no iPhone viruses, you don't have one. Assuming you have not jailbroken your iPhone, you either have a software problem or too many apps running in the background. Push the button at the bottom twice quickly, then touch and hold down one of the apps at the bottom of the screen, all of the ones running will show up with an X in the top corner. Just shut off the ones you don't want running in the background by pushing the X. It will not delete them if you only push the ones in the bottom bar, it will only shut them off. Do not touch any in the main part of the screen. If you have a software problem, plug it into your computer and follow the directions in iTunes to fix it.