Recover Files in The Trash
If you simply put files in the Trash you can restore them by opening the Trash (left-click on the Trash icon) and drag the files from the Trash to your Desktop or other desired location. OS X also provides a short-cut to undo the last item moved to the Trash -press COMMAND-Z.
If you empty the Trash the files are gone. If a program does an immediate delete rather than moving files to the Trash, then the files are gone. Recovery is possible but you must not allow any additional writes to the hard drive - shut it down. When files are deleted only the directory entries, not the files themselves, is modified. The space occupied by the files has been returned to the system as available for storage, but the files are still on the drive. Writing to the drive will then eventually overwrite the space once occupied by the deleted files in which case the files are lost permanently. Also if you save a file over an existing file of the same name, then the old file is overwritten and cannot be recovered.
General File Recovery
If you stop using the disk it's possible to recover deleted files that have not been overwritten by using recovery software such as MAC Data Recovery, Data Rescue II, File Salvage or TechTool Pro. Each of the preceding come on a bootable CD to enable use without risk of writing more data to the disk. Two free alternatives are Disk Drill and Cisdem DataRecovery. Recovery software usually provides trial versions that enable you to determine if the software would help before actually paying for it. Beyond this or if the drive has completely failed, then you would need to send the drive to a recovery service like Drive Savers, which is very expensive.
The longer the hard drive remains in use and data are written to it, the greater the risk your deleted files will be overwritten.
Also, visit The XLab FAQs and read the FAQ on Data Recovery.