If you are running Mac OS 10.5 or later, you will have a built-in backup program called Time Machine. If you’re running an older operating system such as 10.4, then I suggest you upgrade (it costs very little to purchase the latest Mac OS).
Get yourself an external hard drive and plug it into your Mac. Time Machine will pop up asking you if you would like to use the drive for a Time Machine backup. Say Yes and you’re set up! The first backup will take long to run, but after that it will run fairly quickly.
Plug in your drive regularly to keep your backups up to date.