If I am in the middle of downloading something and I close my macbook will it continue to download. If not, how do I get it to not sleep until the download is complete?
It would stop downloading. Keep the screen up and it shouldn't go to sleep until the download is done. All of the options are within Energy Saver in Preferences. But basically it only goes to sleep when inactive unless you close the lid.
That's a good rule of thumb but it can depend on the Mac, the Energy Saver settings and also app being used to download the files. If my iBook is set to Lowest Performance, it'll fall asleep sometimes whilst downloading from Safari.