Hi @Shanbj
Thank you for posting in the HP Support forum. Welcome !
This is happening because Windows was recently updated and the updates failed to install. Windows attempted to restore this automatically which also failed.
Perform hard restart/forced reset. More info and how to here >> http://support.hp.com/us-en/document/c01684768/
Since it is stuck for hours, there is nothing else you could do. Try holding the power-on button for 5-10 seconds until the PC shuts down.
Perform Windows System Restore to attempt to restore back prior to the issue begin time
1. Please, shutdown the computer using the power button
2. Power it on.
2.1 As soon as you press the power-on button, before the Windows or HP logo appears, immediately begin hitting the Esc button (like tap-tap-tap).
This should open a HP Startup Menu which may look similar to this one

3. Choose F11 for System Recovery options.
The computer should boot from it's recovery partition to open you various recovery options. Note, that F11 option will only work if the recovery partition is there (not deleted) and intact. From there, you have prenty of options to choose from. Every HP computer comes with recovery partition present to assist in tough moments.
Please, perform "System Restore" first in an attempt to fix the issue. Please, restore back to previous days (restore point) where the issue was not present. Here is more info:
>> http://support.hp.com/us-en/document/c03327545#AbT5
Let me know if this helps.
Eventually, clarify if this is running Windows 10 or Windows 8.1 ?
Your FEEDBACK is important. Use the interactive buttons below and let me know if the post helps ;
*** HP employee *** I express personal opinion only *** Joined the Community in 2013