If it shipped with Mac OS X 10.6.8 or earlier, connect its original thumbdrive, restart with the Option key held down, tab to it, press Enter, and use the Disk Utility to erase the Mac OS X partition. The procedure is the same on MacBook Airs that shipped with 10.7 or 10.8, except that the preloaded recovery partition is used instead of a thumbdrive.
Install or Reinstall Lion/Mountain Lion from Scratch
Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
Boot to the Recovery HD:
Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
Erase the hard drive:
1. Select Disk Utility from the main menu and click on the Continue button.
2. After DU loads select your startup volume (usually Macintosh HD) from the
left side list. Click on the Erase tab in the DU main window.
3. Set the format type to Mac OS Extended (Journaled.) Optionally, click on
the Security button and set the Zero Data option to one-pass. Click on
the Erase button and wait until the process has completed.
4. Quit DU and return to the main menu.
Reinstall Lion: Select Reinstall Lion/Mountain Lion and click on the Install button.
Note: You will need an active Internet connection. I suggest using Ethernet if possible
because it is three times faster than wireless.