Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Unless the input on your mac
1) has a high impedance to match the one offered by the guitar's pickups
2) has abuilt-in preamp
you'll likely obtain very quiet (and possibily a bit distorted) sounds...
You need an external audio interface, even a cheap one like an M-Audio FastTrack USB: that way at least you'll have a decent signal-to-noise ratio.
 
I have a 2ghz core2duo macbook (white). It has a line-in on the side.

For the price of the M-Audio FastTrack USB i could pick up a stealthplug.
 
I didn't even know it existed! That looks like a very good "cheap toy", it should fill your needs nicely if you're not too demanding and know you will never record anything other than a guitar or a bass.
If you plan on recording with a mic, it just won't do.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.