I would like to back up and clear the contents of my ipad before I sell it off and buy an ipad 2. What is the best way to do this?
You can remove all settings and information from your iPhone, iPad, or iPod touch using "Erase All Content and Settings" in Settings > General > Reset.
From Apple's site.
edit:sorens is correct. The answer to the first part of your question is by default every time you sync with iTunes it backs up your iOS device. So just sync and reset.