Repairing permissions is done from Disk Utility (in the Utilities folder inside the Applications folder). Click your Mac OS X hard drive, then click the Repair Permissions button.
To test your RAM, boot your Mac from the Apple Hardware Test CD that came with it and follow the instructions once it loads.