From Citizendium, the Citizens' Compendium
Phlebotomy is the draining of blood from a vein. In pre-scientific medicine, "bloodletting" was a common, although often harmful, concept in restoring "balance" among the humors conceived by Hippocrates. While blood is commonly drawn from veins, the technique and purposes are very different. Blood is most commonly taken for laboratory testing, but may be used for specialized treatment purposes when the body is overloaded by the volume of blood or of a blood component.
Hippocrates, while the spiritual father of medicine and whose ethics and examining techniques remain valuable, was not a very good physiologist. He is credited with defining metabolism in terms of the "Four Humours": blood, phlegm, bile, and black bile. If they were out of balance, the patient suffered, and, by the theory of the time, an excess (usually of blood) needed to be released. Galen, one of the most famous of ancient physicians, enthusiastically endorsed bloodletting, up to and including unconsciousness. 
Phlebotomy in modern medicine
In modern medicine, phlebotomy, with sterile technique, is a common procedures, although done for very different reasons in the past. It is the method by which blood is obtained from a donor to a blood bank, and is the most common means to draw blood for laboratory analysis.
Several methods are used for taking diagnostic samples. All the methods begin by cleaning the area, but it is not, in a patient with a normal immune system, a procedure done under strict asepsis. The phlebotomist observes universal precautions for safety against blood-borne pathogens, which minimally include gloves and eye protection. All the methods involve locating a vein, for which touch is often the most accurate source. A hypodermic needle of medium diameter is inserted into the vein, using one of several systems. The most basic, but least frequently used, is a hypodermic syringe. In industrialized countries, a common method uses a holder for a double-ended, single-use needle which forms a rigid system much like a hypodermic syringe in terms of handling. Rather than pulling the blood into a syringe for transfer to a sample tube, sample tubes, with color-coded tops indicating preservatives or anticoagulants appropriate for the test to be done, are pressed onto the other end of the needle, and the blood is sucked into the tubes. Tubes are easily changed without removing the needle from the vein.
A third technique, especially useful with children or when the veins are difficult, is to use a "butterfly" needle, which is a smaller needle with plastic "wings" that allow precise handling. From the needle runs a flexible tube, which goes into the sample collection bottle. Butterflies are more expensive, but can be manipulated with finer movements than with the syringe-type units.
Phlebotomy can be an emergency treatment when the heart or lungs are in fluid overload, as in heart failure or pulmonary edema. The goal is to limit the workload on the body's pumping organs. Tourniquets applied sequentially to one limb at a time also can reduce load, without actual blood loss.
Blood may be drawn well before elective surgery, to be available for autotransfusion into the patient. During cardiopulmonary bypass, blood is withdrawn during the anesthesia process, and returned to the patient at the end of surgery; this tends to reduce transfusion requirements.