The purpose of the double declutch is to match the speed of the rotating parts of the gearbox for the gear you wish to select to the speed of the input shaft being driven by the engine. Once the speeds are matched, the gear will engage smoothly. If the speeds are not matched, the gears will "crash" or grate as they come into mesh. A modern synchromesh gearbox accomplishes this automatically.
To perform a double declutch, the clutch is pressed and the gearbox shifted into neutral gear. The clutch is released, the throttle is blipped which applies power to the disengaged gearbox, thus speeding it up internally. The clutch is pressed for the second time and the gear lever moved (smoothly) to the desired gear. The clutch is released again, and the drive continues. This operation is suitable for a down change. For an upchange, it is usually sufficient to allow the gear lever to rest momentarily in neutral and no "blip" is applied. The whole thing can, with practice, take no more than a fraction of a second, and the result is a very smooth (and satisfying) gearchange.
A related manoeuvre is Heel-and-Toe, in which the double declutch is performed while braking (braking and changing down on entry to a bend for example). Because the left foot is operating the clutch, the right foot must operate the brake and accelerator pedal (for the blip) simultaneously. Mastering this is very rewarding, and is essential for high performance driving (e.g. Rallying) where straight-cut gearboxes are often used to minimise the wastage of power.