How to Prevent macbook from sleeping when the lid is closed? When I close the lid, it goes to sleep mode. But sometimes I need my MacBook awake even when the lid is closed while downloading a very large file from the internet or listening to iTunes playlists.

Is there any way to keep my MacBook awake and keep downloading at the same time??
Nope, closing the lid will automatically sleep your Mac. If you want your Mac's screen to be off but for it to continue downloading, download the Caffeine app from the Mac App Store and turn it on (Caffiene stops your Mac from sleeping temporarily) then dim your brightness all the way. The task will continue and the screen will stay off.