How to format a MacBook Air 2012?

The MBA comes with a recovery partition already installed. Reboot and keep CmdR pressed during boot until the Apple icon is displayed in screen. This boots into Recovery Mode allowing you to repair and/or reinstall the MBA from scratch.

See OS X Lion: About Lion Recovery (HT4718) for details.