As a new Mac user, I'm guessing you used to be a Windows user. These things are handled pretty much the same way. If you have open applications and choose to shutdown your Mac, the OS will just close the applications for you before it shuts down. It's a good idea to be sure you don't have any unsaved work first... but unlike Windows... when you select shutdown in OS X, it gives you a two minute timer so you can save anything you may have missed... you also get the option to shut down immediately so you don't actually have to wait the two minutes.
Putting your Mac to sleep is the same as putting a PC in standby (I think Vista actually calls it sleep now). One of the biggest advantages of putting your machine to sleep is that you can return it to the exact same state it was in before you put it to sleep. I tend to close everything before I put my MacBook to sleep... but that's just a mental thing for me... If you're in the middle of a bunch of things, putting your MacBook to sleep just as it is can be very convenient so you can just pick up from where you left off when you open it back up. If the battery gets too low to keep the contents in memory (this takes a few days with a fully charged battery in sleep mode), it will write the contents of memory to disk in what is called safe sleep or deep sleep (I forget which)... which is the same as hibernate on a PC. If that happens, when you turn on your MacBook the next time it will be the same as waking it from sleep but it will take just a little longer because it will have to load everything it saved from your drive.
In short... it's up to you if you close your apps before you shut down or go to sleep. There isn't any harm in not doing so.