There are two different blood vessels arriving at the liver - the hepatic artery and the hepatic portal vein. The hepatic artery supplies the liver with oxygen and comes from the aorta. The hepatic portal vein leads from the small intestine with blood rich in absorbed nutrients. Blood coming from the small intestine is at a much lower pressure than in the hepatic artery and is de-oxygenated. The hepatic vein carries blood away from the liver to the vena cava which transports it back to the heart.
See external link for image of liver and associated organs:
Study of liver tissueEdit
The human liver can contain up to 100 000 lobules. A lobule is a small division of the liver defined at the histological scale - between them lie the branches of the hepatic artery and the hepatic portal vein, with blood flowing through the lobules and then into the branch of the hepatic vein.
The lobules are composed of hepatocytes, which make up 70-80% of the mass of the liver.These cells are involved in protein synthesis, protein storage and transformation of carbohydrates, synthesis of cholesterol, bile salts and phospholipids, and detoxification. The cells are arranged in rows that come out from the hepatic vein which is the centre the rows of hepatocytes are thin - never more than two cells thick so that blood is in close contact with the hepatocyte cells. Channels between these cells carrying blood are called sinusoids, and some channels called bile cannaliculi. Bile coming from the bile cannaliculi enters the bile duct.
Large, phagocytic macrophages called Kupffer cells line the sinusoids, and their role is to destroy bacterium that have made it into the liver, quickly killing via phagocytosis any bacterium.
Please see external image for illustration of the above: 
Carbohydrate & Lipid Metabolism/Synthesis in the LiverEdit
The liver closely works with the pancreas and adrenal glands to control blood glucose levels. Insulin, glucagon and adrenaline, the first two of which are secreted by the pancreas and the last secreted by the adrenal glands affect the way the liver metabolises carbohydrates.
Glucose, a monosaccharide is our way of transporting carbohydrates in the blood. Glucose serves as a main respiratory substrate, but is not suitable for storage. The polysaccahride glycogen is a much more appropriate storage sugar and thus when there is more glucose in the blood than required (for example, just after eating), it is converted to glycogen and stored in a number of places.
When blood glucose levels fall (for example, during exercise), α (alpha) cells in the islets of Langerhans (cells in the pancreas) secret glucagon. Glucagon binds to the glycoprotein receptors on each hepatocyte cell in the liver lobules and starts a process called glycogenolysis. This process simply means 'breaking down glycogen' and the resulting glucose passes out of the hepatocyte, into the blood in the sinusoids and helps raise blood glucose levels back to normal.
When blood glucose levels are too high, β (beta) cells in the islets of Langerhans perform what is essentially the reverse of the above process. They secrete insulin, a hormone that acts on hepatocytes, muscle and fat-containing cells in adipose tissue and stimulates them to convert glucose into glycogen. This lowers the blood glucose levels back to normal.
As a side note, the hormone adrenaline, usually released during times of danger, has many other uses but in the liver it breaks down glycogen to provide glucose to the muscles - to help the person escape whatever danger they are in.
Conversion of other substances to glucoseEdit
The liver can also convert a variety of other substances to glucose, during periods of low glucose levels in the blood, creating additional energy for the body, in a process called gluconeogenesis. This process occurs (in normal circumstances) when all supplies of glycogen have been converted to glucose (i.e. in the beginning stages of starvation). It starts by converting amino acids to glucose, deaminating them first (See section: Protein Metabolism) and excreting the nitrogen containing section of the amino acid in urea and the rest is converted to pyruvate which is used to be converted to glucose.
During exercise, anaerobic respiration may start to occur as the muscles require more oxygen than the blood can supply it with - this produces lactate which is taken in by the hepatocytes, and again converted to pyruvate and then glucose. Glycerol, a key part of lipids can also be converted to glucose.
Lipids are stored in cells that make up adipose tissue - lipids are an important energy-storage compound. Fats can be used to synthesise ATP, an important energy source in humans - even whilst glucose levels in the blood are high, and it may surprise you to learn that most tissues (except nervous tissue and red blood cells - these cells must use glucose) will utilise fatty acids as their primary respiratory substrate. Fatty acids are used more and more if glucose is in short supply.
In the liver, triglyceride molecules are split into glycerol and fatty acids, the latter of which is converted into acetyl coenzyme A - used in the Krebs cycle to produce ATP. The less glucose available, the more this happens - and any excess acetyl coenzyme A can be converted to acetoacetate and released into the blood, since the liver cannot use it, but many other cells in the body can - they convert it to acetyl coenzyme A and feed it into the Krebs cycle.
Above, we discussed breaking down fat to utilise as an energy source - but the synthesis of triglycerides is also performed by the liver - excess sugars and proteins are converted to fat. Once this has happened, they are combined with protein to form lipopoteins, which can be transported to other parts of the body. Lipids are insolouble (cannot be transported in the blood), and the protein of the lipoprotein consists of a shell of polar lipids and proteins. Importantly, lipoproteins can be either high or low density - the importance of which becomes clear in the next section.
The liver also makes cholesterol. This is an extremely important molecule in the body - don't believe all the bad press it gets! Not only is it an essential part of cell membranes (stability, fluidity and relative impermeability to hydrophilic substances), but it also is involved in the synthesis of steroid hormones, and is deposited in the skin to waterproof it. Vitamin D is synthesised from cholesterol, stimulated by UV light from the sun. All this, and it makes bile salts.
The liver also regulates levels of cholesterol, which is present in meat, eggs & dairy products (dietary cholesterol intake). When we receive this cholesterol intake, the liver decreases the rate at which it synthesis cholesterol. This happens as a result of the dietary cholesterol reducing the activity of one of the enzymes that catalyses the synthesis of cholesterol from acetyl coenzyme A. Saturated fats cause the liver to increase the rate at which it converts those to cholesterol, which is why people are told to keep saturated fat levels in the diet to a low level.
Just as with triglycerides, cholesterol must be transported as a lipoprotein. High density lipoproteins and low density lipoproteins can be formed, but it has been observed that is the proportion of HDL to LDL that has a far greater effect on health - LDLs are the bad guys here, causing deposition of cholesterol on blood vessel walls as plaques (causing high blood pressure, heart attacks), whilst HDLs have been shown to remove plaques and protect against them in the first place.
Most of the cholesterol synthesised by the liver in the processes above is used by the heaptocyte cells to make bile. This is then secreted into the bile cannaliculi which then carries some bile into the bile duct (which secretes into the duodenum. The rest of the bile is carried into the gall bladder where it is stored and concentrated before being released.
Whilst water makes up a lot of bile, another major component is bile salts, made from cholesterol. These emulsify fats, make it easier for them to be hydrolysed by the lipases and thus absorbed in the smal intestine. Bile also contains cholesterol, which under normal circumstances combines with bile salts to form water-soluble particles but sometimes it may precipitate out and form gallstones. Gallstones are a serious medical condition which can prevent bile from flowing into the small intestine, causing problems with the digestion of fats. Gallstones can be removed by ultrasound treatment or by surgery.
Bile also contains breakdown products from red blood cells which are broken down in the spleen. The haem group is spilt into iron and bilirubin whilst the globin part is hydrolysed to individual amino acids.
Protein metabolism is performed in the hepatocytes, converting and deaminating amino acids. The liver also makes proteins - including important blood proteins such as albumin, globulins and fibrinogen.
This is the conversion of one amino acid to another. The essential amino acids - the ones we can only obtain from our diet cannot be formed in this way but the remainder of the 20 can be converted to another if our diet does not match our body's requirements.
Liver cells are able to turn excess amino acids into carbohydrates and fats by removing the nitrogen containing part of the molecule, in a process called deamination. This nitrogen containing part is ammonia which, with energy from ATP is combined with carbon dioxide to form urea in the ornithine cycle. The remainder, the carbon-containing part can be converted into carbohydrates or fats, respired or stored.
Synthesis of Plasma ProteinsEdit
Blood contains many proteins dissolved in blood plasma - all of which are obviously soluble proteins. These are the plasma proteins and are nearly all made in the liver. Two important plasma proteins are fibrinogen and prothrombin - these proteins are used in blood clotting.
When blood vessels are damaged, the collagen fibres in the walls are exposed and this activates platlets and causes the conversion of prothrombin (an inactive protein) to an active enzyme called thrombin. Thrombin catalyses the removal of amino acids from fibronogen molecules, which in turn converts it to a polymerise (a form inwhich many molecules can link together), forming fibrin, an insoluble long chain that tangles up and forms a mesh to trap red blood cells - preventing blood from escaping and stopping the entry of pathogens from the outside world.
Globulin, which is the term for most of the golbluar proteins in the blood plasma, some are antibodies but these are made by the cells of the immune system. The other globulins are made by the liver and many of them are transport molecules combining with other molecules for transport - for hormones such as insulin.
Albumin is abundantly available in blood plasma and it's job is to stop too much water leaving the blood and entering tissues. It is too large to pass through the walls of most capillaries.
Formation of tissue fluidEdit
The rate at which tissue fluid is formed is determined by two things. Firstly, relative hydrostatic pressure in the capillary and tissue fluid, which the capillary pressure always being greater, so that the difference tends to push water out of the capillary and into the tissue fluid. The opposing force to this is the solute potential gradient between the blood and tissue fluid. This is where albumin comes in - since it is too large to pass through the walls of capillarys, it maintains a lower solute potential for the blood, making water move from the tissue fluid to the blood. If not for albumin, the solute potential gradient would be overwhelmed by the hydrostatic pressure gradient, and water would build up in the tissue fluid. This is a condition known as oedema and is responsible for the swollen belly of a child suffering from kwashiorkor (a protein deficiency disease).
Many things we ingest are potentially dangerous to our body but the liver breaks them down before they harm us - some excreted in the bile, some broken down into harmless substances. The majority of this process occurs on the smooth endoplasmic reticulum in the hepatocyte cells.
Metabolism of EthanolEdit
Ethanol molecules are small, lipid-soluble and toxic - meaning it can easily diffuse across membranes and enter cells, and it is the livers job to break it down and make it harmless. Ethanol is first converted to ethanal by the enzyme alcohol dehydrogenase, and then to ethanoate by aldehyde dehydrogenase. This can then enter the Krebs cycle and be metabolised to produce ATP - providing a source of energy.
However, if large quantities of alcohol are consumed regularly then the tissues within the liver become damaged. This is due to the breakdown of ethanol producing reduced NAD, reducing the likelihood of reactions needing oxidised NAD occurring. Reactions like this include oxidation of fatty acids, meaning they will accumulate, being stored in the hepatocytes, severely affecting their efficiency at carrying out their function. This is known as a 'fatty liver'.
These effects, combined with the direct toxicity of alcohol on liver cells leads to a condition known as cirrhosis in the liver, where liver cells are just destroyed by ethanol, and while replaced, the cells that replace them have far too much fibrorous tissue (scar tissue) and lose proper blood supply structure. This leads to blood bypassing the filtering process and going on with toxins (and possibly bacteria) in it. All the liver's functions are impaired, for example converting ammonia to urea fails to be as efficient as before, causing ammonia to build up in the blood and cause damage to the central nervous system, which can be fatal.
Breakdown of other substancesEdit
Hormones are released from various places in the body and although not directly harmful, they must be broken down by the liver to prevent them causing their effects indefinitely (which could be harmful). Examples of these would include testosterone, thyroxine and oestrogen. Also, medicinal drugs must be broken down for the same reason. The breakdown products of these substances is eliminated via the kidneys in filtration. The liver converts lipid soluble molecules to water soluble ones so that they can stay in the nephron fluid and be carried to the bladder and be lost.