If you have a used Mac, or a newer one, or one that you have serviced to upgrade its RAM, then it is highly recommended to test the system's RAM before relying on it for day-to-day activities.
RAM is the active work-desk that the OS and applications use for running, and if there is a problem with RAM, then problems stemming from crashes and freezes to data corruption can occur.
This is similar to having a gaping hole on your desk, where things you use like pens, rulers (that is, applications), can fall through and be lost. Alternatively, if you are writing or drawing and have that same hole under your paper, then when you get to the irregular surface, you can puncture the paper or otherwise frustrate your workflow, like data corruption.
To test your Mac's memory, you can use a number of tools, like the Terminal-based Memtest suite, or the OS X GUI wrapper for it called Rember. However, these run within OS X, and having the OS loaded in the background restricts the memory the OS is using from being tested by these programs. Therefore, to minimize the amount of RAM used while testing, boot to the Apple Hardware Test suite, and run the memory tests from there.
To launch the hardware tests, boot your Mac with Option-D held down immediately after you hear the boot chimes, and the tests will download from Apple's servers.
If you have a relatively new Mac, then these tests will run automatically when invoked; however, if not, then you will have to click the Test button -- but be sure to check the box for an extended memory test. It may take a few hours to complete the extended test, but when finished the system will report any errors it has detected with your RAM.
If you see any errors, then be sure to address them by replacing your RAM. Often, manufacturers will provide lifetime warranties for their RAM, so before purchasing new RAM, contact the manufacturer for its warranty policy.
Questions? Comments? Have a fix? Be sure to check us out on Twitter.