When you bought your Mac you should have recieved a number of discs. One of them should say "Apple Hardware test" or something similar. Otherwise, its one of the other recovery disks and you would boot the Mac with the disk inserted while holding down the Alt (Option) key to reach the hardware test.
You should start running that first.
It is time to consider getting a new laptop too, and it could be your harddrive failing, so I would recommend doing a backup of your disk content the sooner the better. You can still get harddrives for your G4 laptop however.

See my blog for a new post I will make shortly after writing this entry (in case you were TOO fast) on how to check a drive for problems. Link in signature.