When it comes to troubleshooting, I always try the simplest things first, and these tricks have been successful in solving some 90 percent of the Mac problems I've encountered.
I've used these to solve a wide variety of weird Mac issues, ranging from poor performance and systems not wanting to boot up (or which are taking a long time to boot), to the fans running crazy or the screen being blank.
Desktop systems (iMac, Mac Pro): Disconnect the power cord, wait 15 seconds, plug it back in, and then wait a further five seconds before turning the Mac on again.
Laptops with non-removable batteries (newer MacBook systems): With the system plugged to a power supply, press and hold SHIFT and OPTION and CONTROL and then press the power button (it helps if you have three arms or an assistant). The simultaneously release all the buttons before starting the Mac normally.
Laptops with removable batteries (older MacBook systems): Disconnect the system from the power supply and remove the battery. Then press and hold down the power button for five seconds. Refit the battery and restart the Mac.
Apple leads owners through a whole list of things to try before resetting the SMC, but since there doesn't appear to be any downside to doing this, and it's simple to do, I tend to just jump straight to giving it a go.
Reset PRAM (Parameter RAM)
Here's another time where a spare arm or an assistant comes in handy. To reset the PRAM you need to hold down COMMAND and OPTION and P and R while powering on the system. Keep holding down the four buttons until you hear your Mac emit the "WALLe" startup chime for the second time.
If you're finding that this doesn't work then you might need to either disconnect all your USB devices or, if you are using a Mac with a wireless keyboard, you might need to go old-school and use a wired keyboard (any USB keyboard will work with a Mac, it just won't be as stylish). Once you're done with the reset, you can go back to your wireless keyboard.
If your system won't boot, a likely cause is a disk issue.
Hold down Command + R while booting your Mac (for older systems running Snow Leopard or earlier, you'll need to dig out your installation disc and pop that into the optical drive, and reboot your computer while holding down C).
From the startup screen select Disk Utility.
Select the hard drive and choose Verify and allow that to run.
If problems are detected, next choose Repair Disk. If no problems are detected, choose Repair Permissions.
Try rebooting the system again.
Run Apple Diagnostics
Boot up your Mac while holding down D, and keep holding it down until asked to choose a language. Note that if this doesn't work, reboot your system while holding down Option + D to carry out start Apple Diagnostics over the internet.
The utility will automatically check your system.
If any problems are found the test will show you reference codes and suggest solutions.
Note that on older systems this test is called Apple Hardware Test.