I think the most likely scenario is that your Windows key is getting stuck “on.”
Certainly if Win+D is pressed, then it minimises windows, so if the Windows key is stuck, then D on its own would do this.
Usually just hitting the Win again should unstick it.
The other option is that you have Sticky Keys enabled, and you have "Lock modifier keys when pressed twice in a row" option enabled, and have then pressed the Win key twice to lock it.
You can enable sticky keys by hitting shift five times in a row, which is easier than it sounds (at least in my experience).
You can check the status of this by going to
Control Panel\Ease of Access\Ease of Access Center\Set up Sticky Keys