You might have an app or other process that is preventing a timely shutdown of your Mac.
Try pressing Option-Command-esc to get a Force Quit window. Quit each app in that list, and see if shutdown will then work. That may show what is preventing a simple Shut Down. If nothing is apparent, then open your Activity monitor, where you can see all processes. Do you see a heavy use of the processor?
The more often that you must force your system to shutdown, you may begin to experience problems that are related to directory problems, so be sure to start in single-user mode (hold command-S as you boot) You will see text scrolling down. You can check your hard drive then:
At the prompt - type /sbin/fsck -fy
Then press return or enter. You will see some lines showing that your volume directory is being tested. If you get errors that are corrected - run the same command again until no problems are found. If you see errors that are NOT corrected, then you will need a more capable utility, such as Disk Warrior.
Here's a trick that may often help with slow shutdown - download and reinstall your present combined OS X updater. Here's a link for that:
http://support.apple.com/downloads/Mac_OS_X_10_5_7_Combo_Update
Download, then RESTART your mac before running the installer. Don't do anything else with your Mac while that update installs.