My iPhone 4 is stuck on loading screen?

My iPhone is Jailbroken and I was trying to install something from Cydia and then it let me to a light black screen. I couldn't do anything when I had the light black screen. So then I waited to the battery get dry, and when I charged it back on, it had the Apple's logo, then it led to the loading circle. After 5-10 minutes of the loading circle, it led to the Apple's logo again and then led to the loading circle. This has been going for about 4 hours or so. I tried holding the power button and home button for 10 seconds. It does the same thing. It led to the Apple's logo then the loading circle. What can I do to fix this?

You just got a virus. You need to restore to the original IOS firmware in order to get it to work.
It's not going to be easy to restore it since your iPhone is jailbroken, so you need to download the restore firmware, set the iPhone in DFU mode. To search for instructions on how to restore to an original firmware after jailbreak, go to:

ijailbreak.com, besttechinfo.com or iphoneleaks.net and search for how to dfu mode.