Veins are blood vessels in the circulatory system of humans and most other animals that carry blood toward the heart. Most veins carry deoxygenated blood from the tissues back to the heart; exceptions are those of the pulmonary and fetal circulations which carry oxygenated blood to the heart. In the systemic circulation arteries carry oxygenated blood away from the heart, and veins return deoxygenated blood to the heart.
There are three sizes of veins, large, medium, and small. Smaller veins called venules, and the smallest the post-capillary venules are microscopic, and they make up the veins of the microcirculation.
Veins have less smooth muscle, and connective tissue than arteries, and are often closer to the skin. Because of the thinner walls in veins they are able to expand and can hold more blood. At any time, nearly 70% of the total volume of blood in the human body is in the veins.  In medium and large sized veins the flow of blood is maintained by one-way (unidirectional) venous valves to prevent backflow.  
There are three sizes of vein, large, medium, and small. Smaller veins are called venules. The smallest veins are the post-capillary venules. Veins have a similar three-layered structure to arteries. The layers known as tunicas have a concentric arrangement that forms the wall of the vessel. The outer layer, is a thick layer of connective tissue called the tunica externa or adventitia; this layer is absent in the post-capillary venules.  The middle layer, consists of bands of smooth muscle and is known as the tunica media. The inner layer, is a thin lining of endothelium known as the tunica intima. The tunica media in the veins is much thinner than that in the arteries as the veins are not subject to the high systolic pressures that the arteries are. There are valves present in many veins that maintain unidirectional flow.
Unlike arteries, the precise location of veins varies among individuals. 
Veins close to the surface of the skin appear blue for a variety of reasons. The factors that contribute to this alteration of color perception are related to the light-scattering properties of the skin and the processing of visual input by the visual cortex, rather than the actual colour of the venous blood which is dark red. 
The venous system is the system of veins in the systemic and pulmonary circulations that return blood to the heart. In the systemic circulation the return is of deoxygenated blood from the organs and tissues of the body, and in the pulmonary circulation the pulmonary veins return oxygenated blood from the lungs to the heart. Whilst the main veins hold a relatively constant position, unlike arteries, the precise location of veins varies among individuals. 
Veins vary in size from the smallest post-capillary venules, and more muscular venules, to small veins, medium veins, and large veins. In the circulatory system, blood first enters the venous system from capillary beds where arterial blood changes to venous blood.
The first entry of venous blood is from the convergence of two or more capillaries into a microscopic, post-capillary venule.  Post-capillary venules have a diameter of between 10 and 30 micrometres (μm). Their endothelium is of flattened oval or polygon shaped cells surrounded by a basal lamina. Post-capillary venules are too small to have a smooth muscle layer and are instead supported by pericytes that wrap around them. Post-capillary venules become muscular venules when they reach a diameter of 50μm.  These larger venules feed into small veins.
The small veins merge to feed as tributaries into medium sized veins. The medium veins feed into the large veins which include the internal jugular, and renal veins, and the venae cavae that carry the blood directly into the heart.  The venae cavae enter the right atrium of the heart from above and below. From above, the superior vena cava carries blood from the arms and head to the right atrium of the heart, and from below, the inferior vena cava carries blood from the legs and abdomen to the right atrium. The inferior vena cava is retroperitoneal and runs to the right and roughly parallel to the abdominal aorta along the spine.
The three main compartments of the venous system are the deep venous system, the superficial venous system, and the perforator veins.  Superficial veins are those closer to the surface of the body, and have no corresponding arteries. Deep veins are deeper in the body and have corresponding arteries. Perforator veins drain from the superficial to the deep veins.  These are usually referred to in the lower limbs and feet. 
There are a number of venous plexuses where veins are grouped or sometimes combined in networks at certain body sites.
Blood flows back to the heart in the deep veins, with the flow of blood maintained by one-way valves. The valves serve to prevent regurgitation (back flow) due to the low pressure of veins, and the pull of gravity.  They also serve to prevent the over-widening of the vein.   Venous valves are bicuspid having two cusps or leaflets. They are formed from folds of endothelium supported by a layer of connective tissue. There are more valves in the lower leg, with the number decreasing as the veins travel to the hip. The valves in the leg divide the column of blood into segments, and ensure blood flow from superficial to deep, and its direction towards the heart. 
There are some separate systemic circulatory routes that supply specific organs. They include the coronary circulation, the cerebral circulation, the bronchial circulation, and the renal circulation.
In the coronary circulation, the blood supply to the heart, cardiac veins (or coronary veins) remove the deoxygenated blood from the heart muscle. These include the great cardiac vein, the middle cardiac vein, the small cardiac vein, the smallest cardiac veins, and the anterior cardiac veins. Cardiac veins carry blood with a poor level of oxygen, from the heart muscle to the right atrium. Most of the blood of the cardiac veins returns through the coronary sinus. The anatomy of the veins of the heart is very variable, but generally it is formed by the following veins: heart veins that go into the coronary sinus: the great cardiac vein, the middle cardiac vein, the small cardiac vein, the posterior vein of the left ventricle, and the oblique vein of the left atrium (oblique vein of Marshall). Heart veins that go directly to the right atrium: the anterior cardiac veins, and the smallest cardiac veins (Thebesian veins). 
In the bronchial circulation that supplies blood to the lung tissues, bronchial veins drain venous blood from the large main bronchi into the azygous vein, and ultimately the right atrium. Venous blood from the bronchi inside the lungs drains into the pulmonary veins and empties into the left atrium; since this blood never went through a capillary bed it was never oxygenated and so provides a small amount of shunted deoxygenated blood into the systemic circulation. 
In the cerebral circulation supplying the cerebrum the venous drainage can be separated into two subdivisions: superficial and deep. The superficial system is composed of dural venous sinuses, which have walls composed of dura mater as opposed to a traditional vein. The dural sinuses are therefore located on the surface of the cerebrum. The most prominent of these sinuses is the superior sagittal sinus which flows in the sagittal plane under the midline of the cerebral vault, posteriorly and inferiorly to the confluence of sinuses, where the superficial drainage joins with the sinus that primarily drains the deep venous system. From here, two transverse sinuses bifurcate and travel laterally and inferiorly in an S-shaped curve that forms the sigmoid sinuses which go on to form the two jugular veins. In the neck, the jugular veins parallel the upward course of the carotid arteries and drain blood into the superior vena cava.
The deep venous drainage is primarily composed of traditional veins inside the deep structures of the brain, which join behind the midbrain to form the vein of Galen. This vein merges with the inferior sagittal sinus to form the straight sinus which then joins the superficial venous system mentioned above at the confluence of sinuses.
The three layers of the vein wall are the outer tunica externa, the middle tunica media and the inner tunica intima. There are also numerous valves present in many of the veins.
The outer tunica external is a sheath of thick connective tissue.
The middle tunica media is mainly of smooth muscle.
The inner tunica intima is a lining of endothelium comprising a single layer of extremely flattened epithelial cells, supported by delicate connective tissue. 
Veins serve to return blood from organs, and tissues to the heart. Veins are also called "capacitance vessels" because most of the blood volume (60%) is contained within veins. In systemic circulation oxygenated blood is pumped by the left ventricle through the arteries to the muscles and organs of the body, where its nutrients and gases are exchanged at capillaries. After taking up cellular waste and carbon dioxide in capillaries, blood is channeled through vessels that converge with one another to form venules, which continue to converge and form the larger veins. The de- oxygenated blood is taken by veins to the right atrium of the heart, which transfers the blood to the right ventricle, where it is then pumped through the pulmonary arteries to the lungs. In pulmonary circulation the pulmonary veins return oxygenated blood from the lungs to the left atrium, which empties into the left ventricle, completing the cycle of blood circulation.
The return of blood to the heart is assisted by the action of the muscle pump, and by the thoracic pump action of breathing during respiration. Standing or sitting for a prolonged period of time can cause low venous return from venous pooling (vascular) shock. Fainting can occur but usually baroreceptors within the aortic sinuses initiate a baroreflex such that angiotensin II and norepinephrine stimulate vasoconstriction and heart rate increases to return blood flow. Neurogenic and hypovolaemic shock can also cause fainting. In these cases, the smooth muscles surrounding the veins become slack and the veins fill with the majority of the blood in the body, keeping blood away from the brain and causing unconsciousness. Jet pilots wear pressurized suits to help maintain their venous return and blood pressure.
The arteries are perceived as carrying oxygenated blood to the tissues, while veins carry deoxygenated blood back to the heart. This is true of the systemic circulation, by far the larger of the two circuits of blood in the body, which transports oxygen from the heart to the tissues of the body. However, in pulmonary circulation, the arteries carry deoxygenated blood from the heart to the lungs, and veins return blood from the lungs to the heart. The difference between veins and arteries is their direction of flow (out of the heart by arteries, returning to the heart for veins), not their oxygen content. In addition, deoxygenated blood that is carried from the tissues back to the heart for reoxygenation in the systemic circulation still carries some oxygen, though it is considerably less than that carried by the systemic arteries or pulmonary veins.
Most disorders of the veins involve obstruction such as a thrombus or insufficiency of the valves, or both of these.   The medical speciality involved with the diagnosis and treatment of venous disorders is known as phlebology (also venology), and the specialist concerned is a phlebologist.  There are a number of vascular surgeries and endovascular surgeries carried out by vascular surgeons to treat many venous diseases.
Venous insufficiency is the most common disorder of the venous system, and is usually manifested as spider veins or varicose veins. Several treatments are available including endovenous thermal ablation (using radiofrequency or laser energy), vein stripping, ambulatory phlebectomy, foam sclerotherapy, laser, or compression.
Deep vein thrombosis is a condition in which a blood clot forms in a deep vein. This is usually the veins of the legs, although it can also occur in the veins of the arms. Immobility, active cancer, obesity, traumatic damage and congenital disorders that make clots more likely are all risk factors for deep vein thrombosis. It can cause the affected limb to swell, and cause pain and an overlying skin rash. In the worst case, a deep vein thrombosis can extend, or a part of a clot can break off and land in the lungs, called pulmonary embolism.
The decision to treat deep vein thrombosis depends on its size, a person's symptoms, and their risk factors. It generally involves anticoagulation to prevents clots or to reduce the size of the clot. Intermittent pneumatic compression is a method used to improve venous circulation in cases of edema or in those at risk from a deep vein thrombosis.
The portal vein also known as the hepatic portal vein carries blood drained from most of the gastrointestinal tract to the liver. Portal hypertension is mainly caused by cirrhosis of the liver. Other causes can include an obstructing clot in a hepatic vein ( Budd Chiari syndrome) or compression from tumors or tuberculosis lesions. When the pressure increases in the portal vein, a collateral circulation develops, causing visible veins such as esophageal varices.
Phlebitis is the inflammation of a vein. It is usually accompanied by a blood clot when it is known as thrombophlebitis. When the affected vein is a superficial vein in the leg, it is known as superficial thrombophlebitis, and unlike deep vein thrombosis there is little risk of the clot breaking off as an embolus.
The Batson venous plexus, or simply Batson's plexus, runs through the inner vertebral column connecting the thoracic and pelvic veins. These veins are noted for being valveless, which is believed to be the reason for metastasis of certain cancers.
The great saphenous vein is the most important superficial vein of the lower limb. First described by the Persian physician Avicenna, this vein derives its name from the word safina, meaning "hidden". This vein is "hidden" in its own fascial compartment in the thigh and exits the fascia only near the knee. Incompetence of this vein is an important cause of varicose veins of lower limbs.
The Thebesian veins within the heart muscle are valveless veins that drain directly into the chambers of the heart. The coronary veins all empty into the coronary sinus which empties into the right atrium.
The dural venous sinuses within the dura mater surrounding the brain receive blood from the brain and also are a point of entry of cerebrospinal fluid from arachnoid villi absorption. Blood eventually enters the internal jugular vein.
The Greek physician Herophilus distinguished veins from arteries but thought that the pulse was a property of arteries themselves. Greek anatomist Erasistratus observed that arteries that were cut during life bleed. He ascribed the fact to the phenomenon that air escaping from an artery is replaced with blood that entered by very small vessels between veins and arteries. Thus he apparently postulated capillaries but with reversed flow of blood. 
In 2nd century AD Rome, the Greek physician Galen knew that blood vessels carried blood and identified venous (dark red) and arterial (brighter and thinner) blood, each with distinct and separate functions. Growth and energy were derived from venous blood created in the liver from chyle, while arterial blood gave vitality by containing pneuma (air) and originated in the heart. Blood flowed from both creating organs to all parts of the body where it was consumed and there was no return of blood to the heart or liver. The heart did not pump blood around, the heart's motion sucked blood in during diastole and the blood moved by the pulsation of the arteries themselves.
Galen believed that the arterial blood was created by venous blood passing from the left ventricle to the right by passing through 'pores' in the interventricular septum, air passed from the lungs via the pulmonary artery to the left side of the heart. As the arterial blood was created 'sooty' vapors were created and passed to the lungs also via the pulmonary artery to be exhaled.
In addition, Ibn al-Nafis had an insight into what would become a larger theory of the capillary circulation. He stated that "there must be small communications or pores (manafidh in Arabic) between the pulmonary artery and vein," a prediction that preceded the discovery of the capillary system by more than 400 years.  Ibn al-Nafis' theory, however, was confined to blood transit in the lungs and did not extend to the entire body.
Finally, William Harvey, a pupil of Hieronymus Fabricius (who had earlier described the valves of the veins without recognizing their function), performed a sequence of experiments, and published Exercitatio Anatomica de Motu Cordis et Sanguinis in Animalibus in 1628, which "demonstrated that there had to be a direct connection between the venous and arterial systems throughout the body, and not just the lungs. Most importantly, he argued that the beat of the heart produced a continuous circulation of blood through minute connections at the extremities of the body. This is a conceptual leap that was quite different from Ibn al-Nafis' refinement of the anatomy and bloodflow in the heart and lungs."  This work, with its essentially correct exposition, slowly convinced the medical world. However, Harvey was not able to identify the capillary system connecting arteries and veins; these were later discovered by Marcello Malpighi in 1661.