If you're having trouble with your Mac and think the cause could be hardware-related, you can run the Apple Hardware Test. It's a set of tools by Apple which perform basic and extensive tests on your hardware to see whether they are still okay. These tools are available for anyone with a Mac, and are either preinstalled on your system, or available through your OS'es installation discs.
Applies usually to older models of Mac.
You can download the AHT disc images for a number of older Mac models through here: http://www.info.apple.com/support/aht.html.
For newer (G4, G5) PowerPC-based Macs, the hardware test is usually located on Install Disc 1.
Depending on version of Mac OSX, the hardware test is located:
To start the hardware test, perform the following steps:
To find out whether you have intermittent hardware problems or finding the cause of the occassional kernel panic, try running the hardware test in loop mode. To use it, before starting the Extended Test, press Control-L. A message will appear on screen, indicating the selected test will run in loop mode.
To abort the test loop, you can do so by one of the following:
If your Mac does not have a compatible Apple Hardware Test available, you can use Micromat TechTool Pro 5, a comprehensive suite of various hardware tests, including memory and disk analysis. If you have an AppleCare Protection Plan, you may have received a TechTool Deluxe CD with some of the hardware tests. For a small price, one could then upgrade to TechTool Pro.
Alternatively, to check for memory problems, you can also use the free Memtest OSX software.