Press and hold the power button from about 10 to 30 seconds. Pulling the battery is a bad idea.
If the press and hold fails, there's a hardware issue.
The thing is, there are so many prior discussions about shut down failures that I think you meant you want a solution other than what's been discussed. It's an old issue caused by so many things from malware to folk updating drivers (please stop folk) to something else.
My test to see if it's a software issue is to boot Safe Mode and see if it shuts down fine there.
Be sure to know your power button settings too.
Bob
I have a problem when I got to shut down my Dell XPS 15 (L502x). When I do a normal shut down or even restart the computer never full shuts down. The fans and keyboard all stay on however Windows 7 itself does shut down. The only way to fully power down is removing the battery and unplugging. All other buttons become unresponsive in this state.
Is there any way to fix this issue? Is it a known issue? I was not able to find help anywhere.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic