Doc: fastboot intro

A quick introduction to fastboot
fastboot is a small tool that comes with the Android SDK (software developer kit) that can be used to re-flash partitions on your device. It is an alternative to the recovery mode for doing installations and updates.

Because fastboot mode can start on your device even before Android loads (and can even run when Android isn't installed at all), fastboot mode is useful for updating the firmware quickly, without having to use a recovery mode. In fact, it's frequently the preferred way to initially install the recovery image on many devices. Fastboot can also be used for developer operations like unlocking the bootloader of Google's Nexus devices.

Not all devices support fastboot, but many do.

There are two "sides" to using fastboot-- the computer side and the device side. Typically your device first is connected to your computer via a USB cable. Then you boot to the "fastboot mode" on the device. On your computer, you then run the  tool to issue commands. Please note that fastboot commands will ONLY work while the device is in fastboot mode.

Getting fastboot
See here for instructions on downloading the latest Android SDK, and thus fastboot, for your computer.

errors
If you see at any point when executing fastboot command, the PC is not configured to use fastboot properly. Most typically, this is because you are not running fastboot with elevated privileges. It may also be that you do not have the drivers correctly installed, which may happen under Windows 8 because of its insistence on signed drivers.

Linux/OSX
Run fastboot as root or with sudo.

Windows
Run fastboot as an Administrator.

Make sure the output of  returns your device serial number or you will never get past this error message.