Which version of Windows you're using?? Such problems should come with all the necessarily details like OS version, CPU, Motherboard, RAM, Video Graphics card etc.
For the time being, based on my experience, I could only recommend you to start your system in safe mode and see if you could able to access your desktop now. Once you're at the desktop, kindly remove all the unused or suspicious applications from the system.
If that didn't solve your problem, kindly remove all the externally attached storage devices like USB, pen drive, external hard drive etc. and restart your system.
Revert back if you still can't get over the mentioned situation!!