First, I'd check to see if any apps are not closing/responding. If so, close or if need be, force quit them. But normally if an app is not responding there is a timeout.
If that does not work, try "sudo shutdown -h now" from Terminal (making sure you save anything that needs saving first)
Or as a last resort, hold down the power button, which will force your Mac to power down without shutting down OS X.
If its still a persistent issue, here are some general things I would try:
. not starting up any 3rd party apps at login to test if some 3rd party app could be the culprit
. cleaning up user and system caches
. running fsck
. repairing permissions
. running hardware diagnostics