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, in the deep veins. 
There are three sizes of veins, large, medium, and small. Smaller veins are called venules, and the smallest the post-capillary venules are microscopic that make up the veins of the microcirculation.  Veins are often closer to the skin than arteries.
Veins have less smooth muscle, and connective tissue, and wider internal diameters than arteries. Because of their thinner walls and wider lumens they are able to expand and hold more blood. This greater capacity gives them the term of capacitance vessels. 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.   In the lower limbs this is also aided by muscle pumps, also known as venous pumps that exert pressure on intramuscular veins when they contract and drive blood back to the heart. 
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. Almost 70% of the blood in the body is in the veins, and almost 75% of this blood is in the small veins and venules.  All of the systemic veins are tributaries of the largest veins, the superior and inferior vena cava, which empty the oxygen-depleted blood into the right atrium of the heart.  The thin walls of the veins, and their greater internal diameters ( lumens) enable them to hold a greater volume of blood, and this greater capacitance gives them the term of capacitance vessels.  This characteristic also allows for the accommodation of pressure changes in the system. The whole of the venous system, bar the post-capillary venules is a large volume, low pressure system.  The venous system is often asymmetric, and 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. The thickness of the walls of the veins varies as to their location – in the legs the vein walls are much thicker than those in the arms.  In the circulatory system, blood first enters the venous system from capillary beds where arterial blood changes to venous blood.
Large arteries such as the thoracic aorta, subclavian, femoral and popliteal arteries lie close to a single vein that drains the same region. Other arteries are often accompanied by a pair of veins held in a connective tissue sheath. The accompanying veins are known as venae comitantes, or satellite veins, and they run on either side of the artery. When an associated nerve is also enclosed, the sheath is known as a neurovascular bundle.  This close proximity of the artery to the veins helps in venous return due to the pulsations in the artery.  It also allows for the promotion of heat transfer from the larger arteries to the veins in a counterflow exchange that helps to preserve normal body heat. 
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), and are part of the microcirculation. 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,  and can reach a diameter of 1 mm.  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, head, and chest 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 the larger of the two. 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 veins, the superficial veins, 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. The Batson venous plexus, runs through the inner vertebral column connecting the thoracic and pelvic veins. These veins are noted for being valveless, believed to be the reason for metastasis of certain cancers.
A subcutaneous venous plexus is continuous, and a high rate of flow is supplied by small arteriovenous anastomoses. The high rate of flow ensures heat transfer to the vein wall. 
Blood flows back to the heart in the systemic deep veins, with the flow of blood maintained by one-way valves in the deep veins, superficial veins, and in the perforator veins.  The venous valves serve to prevent regurgitation (backflow) due to the low pressure of veins, and the pull of gravity.  They also serve to prevent the over-widening of the vein.  
A venous valve is bicuspid (having two leaflets) and is formed by an infolding of part of the tunica intima on either side of the lumen of the veins. The leaflets are strengthened with collagen, and elastic fibres, and covered with endothelium.  The endothelial cells on the surfaces of the leaflets facing the vein wall, are arranged transversely. On the leaflet surfaces that open to let the blood flow, the cells are arranged longitudinally in the direction of the flow. The leaflets are attached to the venous wall at their convex edges. Their margins are concave and are directed with the flow lying against the wall.  As the valve forms, the vein wall where the leaflets attach, becomes dilated on each side. These widenings form the pockets, hollow cup-shaped regions, on the cardial side, known as the valvular sinuses.  The endothelial cells in the sinuses are able to stretch twice as much as those in areas without valves.  When the blood tries to reverse its direction (due to low venous pressure and the pull of gravity), the sinuses fill first closing the leaflets and keeping them together.  
The deep veins of the lower limb include the common femoral vein, femoral vein, and the deep femoral vein; the popliteal vein, the tibial, and fibular veins. In the common femoral vein one valve is located above the saphenofemoral junction called the suprasaphenic valve. There are sometimes two valves in the same tract. In the femoral vein there are often three valves, the most constantly found valve is just below the joining of the deep femoral vein. The deep femoral vein and its perforators have valves. In the popliteal veins there are between one and three valves; in each posterior tibial vein there are between 8 and 19 valves, and in the anterior tibial veins there are between 8 and 11 valves. 
In the superficial veins there are between one and seven valves along the thigh portion of the great saphenous vein (GSV); two to six below the knee and one to four in the marginal veins of the foot. There is a valve at the termination of the GSV known as the terminal valve to prevent reflux from the femoral vein A preterminal valve is located just below the openings of the tributaries to prevent reflux form these into the GSV.  Incompetence of the GSV is a common cause of varicose veins.
The valves also divide the column of blood into segments which helps move the blood unidirectionally to the heart.  Their action is supported by the action of skeletal muscle pumps that contract and compress the veins. A skeletal muscle is confined in its fascia and contraction of the muscle which makes it wider results In compression on the vein that pushes the blood forward.  Valves in the perforating veins close when a calf muscle contracts, to prevent backflow from the deep veins to the superficial.  There are more valves in the lower leg, due to increased gravitational pull, with the number decreasing as the veins travel to the hip. There are no valves in the veins of the thorax or abdomen. 
Approximately 95% of the venous valves are in the small veins of less than 300 micrometres. 
There is a valve at the junction of the inferior vena cava (one of the great vessels) and the right atrium known as the valve of inferior vena cava also known as the eustachian valve.
There are some separate parallel systemic circulatory routes that supply specific regions, and 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, is drained by cardiac veins (or coronary veins) that 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.
A portal venous system is a series of veins or venules that directly connect two capillary beds. The two systems in verebrates are the hepatic portal system, and the hypophyseal portal system.
An anastomosis is a joining of two structures such as blood vessels. In the circulation these are called circulatory anastomoses, one of which is the join between an artery with a vein known as an arteriovenous anastomosis. This connection which is highly muscular, enables venous blood to travel directly from an artery into a vein without having passed from a capillary bed.  
Abnormal connections can be present known as arteriovenous malformations. These are usually congenital and the connections are made from a tangle of capillaries.  A cerebral arteriovenous malformation is one that is located in the brain. An irregular connection between an artery and a vein is known as arteriovenous fistula.
A small specialised arteriovenous anastomosis known as a glomus body or organ serves to transfer heat in the fingers and toes. The small connection is surrounded by a capsule of thickened connective tissue. In the hands and feet there are a great number of glomera. 
A vascular shunt can also bypass the capillary bed and provide a route for blood supply directly to a collecting venule. This is achieved by a metarteriole that supplies around a hundred capillaries. At their junctions are precapillary sphincters that tightly regulate the flow of blood into the capillary bed. When all of the sphincters are closed blood can flow from a metarteriole into a thoroughfare channel and into a collecting venule bypassing the capillary bed.  
A communicating vein directly connects two parts of the same system such as the Giacomini vein that connects the (superficial) small saphenous vein with the (superficial) great saphenous vein. Peripheral veins carry blood from the limbs and hands and feet.
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 externa, also known as the tunica adventitia is a sheath of thick connective tissue. This layer is absent in the post-capillary venules. 
The middle tunica media is mainly of vascular smooth muscle cells, elastic fibers and collagen. This layer is much thinner than that in arteries  Vascular smooth muscle cells control the size of the vein lumens, and thereby help to regulate blood pressure. 
The inner tunica intima is a lining of endothelium comprising a single layer of extremely flattened epithelial cells, supported by delicate connective tissue.  This subendothelium is a thin but variable connective tissue.  The tunica intima has the most variation in blood vessels, in terms of their wall thickness and relative size of their lumen. The endothelial cells continuously produce nitric oxide a soluble gas, to the cells of the adjacent smooth muscle layer. This constant synthesis is carried out by the enzyme endothelial nitric oxide synthase (eNOS).  Other endothelial secretions are endothelin, and thromboxane (vasoconstrictors), and prostacyclin a vasodilator. 
In the systemic circulation, veins serve to return oxygen-depleted blood from organs, and tissues to the right heart. From here it passes to the pulmonary arteries for the pulmonary circulation to return oxygen-rich blood to the left heart in the pulmonary veins, to be pumped back into the systemic circulation to complete the cycle. Veins have thinner walls than arteries, and a wider diameter that allow them to expand and hold a greater volume of blood. This gives them a functional role of capacitance that makes possible the accommodation of different pressures in the system. The venous system apart from the post-capillary venules is a high volume, low pressure system. Vascular smooth muscle cells control the size of the vein lumens, and thereby help to regulate blood pressure. 
The post-capillary venules are exchange vessels whose ultra-thin walls allow the ready diffusion of molecules from the capillaries. 
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.
Most venous diseases involve obstruction such as a thrombus or insufficiency of the valves, or both of these.   Other conditions may be due to inflammation, or compression. 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 either 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.
Postphlebitic syndrome is venous insufficiency that develops following deep vein thrombosis. 
Venous thrombosis is the formation of a thrombus (blood clot) in a vein. This most commonly affects a deep vein known as deep vein thrombosis (DVT), but can also affect a superficial vein known as superficial vein thrombosis (SVT).
DVT usually occurs in the veins of the legs, although it can also occur in the deep 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 as an embolus and lodge in a pulmonary artery in the lungs, known as a pulmonary embolism.
The decision to treat deep vein thrombosis depends on its size, 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.
SVT is the development of a thrombus in a superficial vein. SVT is not normally clinically significant, but the thrombus can migrate into the deep venous system where it can also give rise to a pulmonary embolism.  The main risk factor for SVT in the lower limbs is varicose veins. 
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. 
Some disorders as syndromes result from compression of a vein. These include a venous type of thoracic outlet syndrome, due to compression of a subclavian vein; nutcracker syndrome most usually due to compression of the left renal vein, and May–Thurner syndrome associated with compression of the iliac vein which can lead to iliofemoral DVT. Compression of the superior vena cava most usually by a malignant tumor can lead to superior vena cava syndrome. 
A vascular anomaly can be either a vascular tumor or a birthmark, or a vascular malformation.  In a tumor such as infantile hemangioma the mass is soft, and easily compressed, and their coloring is due to the dilated anomalous involved veins.  They are most commonly found in the head and neck. Venous malformations are the type of vascular malformation that involves the veins. They can often extend deeper from their surface appearance, reaching underlying muscle or bone.  In the neck they may extend into the lining of the mouth cavity or into the salivary glands.  They are the most common of the vascular malformations.  A severe venous malformation can involve the lymph vessels as a lymphaticovenous malformation. 
Venous access is any method used to access the bloodstream through the veins, either to administer intravenous therapy such as medication, or fluid, parenteral nutrition, to obtain blood for analysis, or to provide an access point for blood-based treatments such as dialysis or apheresis. Access is most commonly achieved via the Seldinger technique, and guidance tools such as ultrasound and fluoroscopy can also be used to assist with locating an access placement.
Ultrasound, particularly duplex ultrasound, is the most usual and widely used way of viewing veins in the diagnosis of venous disease.   Venography is an invasive procedure that uses a catheter to deliver a contrast agent in giving an X-ray of veins. An augmented reality healthcare application is a near-infrared vein finder that films subcutaneous veins, and projects their image either onto a screen or onto the person's skin. 
Some imaging techniques using veins have been developed for identification purposes. These vein matching technologies, include finger vein recognition,  and eye vein verification.
The Greek physician Herophilus (born 335 BC) distinguished veins from arteries, noting the thicker walls of 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.