In Garageband:
Open the bottom bar where you can "enhance timing" and "enhance tuning" and the simplest way is to make sure the song you're recording/singing is in the key that you've set in garageband, and then just drag the Enhance Timing bar to the top, (or wherever you want in between) and click "adjust to key" or whatever it says. or you can just not click it, and it will stay in chromatic.
In Logic:
Just add a plugin on your vocal track, there's a plugin called Pitch Correction. and just choose the key of the song you're in, major/minor/etc. you can play around with it in many ways, but if you have NO music theory experience whatsoever and have no idea what the heck key signatures/scales or anything means, just leave it to chromatic, and it will be okay, but nothing compared to setting the key, or adjusting the notes. Oh, and make sure to drag the bar all the way down to the fastest response.
Hope it helps.