How to completely wipe a mac?

I have a Unibody Macbook that my brother gave me and i would like to completely erase everything and to start fresh like a new macbook. How can i do that? Also, there's some programs in the computer that he bought how can i get them again after i wipe the mac? My iphone is also synced with this computer, will i be able to sync it without loosing everything if i completely wipe my computer? Will i loose my itunes library?

You have to take it to the apple store they do it for 50 i think i'm not sure

Format the hard drive.

You can wipe if if you boot up from a dvd or an external drive that has the OS. You will need to reinstall the programs with the correct serial numbers unless he bought it at the apps store, then you'll need to sign it with his ID. You will not lose anything when syncing as long as the syn'ed items are form the store. You need to sign in with your id. Make two user, one with his itune login and one with yours.