E-cigarette

An electronic cigarette (or e-cigarette, e-cig) is a cigarette substitute. It gives small amounts of the chemical nicotine without the tobacco or other chemicals from real cigarettes. The main substances making up in the liquid in the e-cigarettes are nicotine, propylene glycol, glycerin and some flavors or smells. Using an e-cigarette is known as "vaping".
Function.
An E-cigarette is made of 3 parts:
The e-liquid (propylene glycol and/or glycerin) is heated to make a vapour which looks like the smoke from real cigarettes. This caries the nicotine to the lungs where it is absorbed.
As of 2015, 3 generations of "electonic cigarettes" are known:
History.
The modern electronic cigarette was invented by Hon Lik (regarded as the 'father of the electronic cigarette'), a Chinese pharmacist and inventor. Hon had himself quit smoking, after his father, also a heavy smoker, had died of lung cancer. Hon patented the modern e-cigarette design in 2003, and starting selling it domestically. Many versions made their way to the U.S., sold mostly over the Internet by small marketing firms.
However, many US and Chinese e-cig manufacturers copied his designs illegally, and as a result Hon Lik did not get the expected financial rewards for his invention (although some US manufacturers have recompensated him through out of court settlements).
In 2008, this attracted the attention of the World Health Organization ("WHO") who said that these e-cigarettes were not proper nicotine replacement therapy and that this mis-information had to be taken away from any sites or advertisements saying that they were.
Starting 2012 Tobacco companies also want a piece of E-Cigarette-cake and work on their own products. Marlboro goes for heating tobacco, Philip Morris tests a fizz-like method while British American Tobacco tries a medical-like inhaler. Many big tobacco companies didn't do their own research or stopped at some point. Instead they bought smaller e-cig companies to enter the market.
E-Liquid.
These devices have a battery powered heating element and tank that contains a liquid solution made by combining nicotine, vegetable glycol or propylene glycol and flavorings. The gadget that can be bought in a variety of shapes and sizes usually resembles a pen or a regular cigarette, and it works like a vaporizer. The liquid used in e-cigs is commonly made of propylene glycol, glycerin, distilled water, artificial (fake) flavors and optionally nicotine. It often tastes like tobacco, fruit, mint/menthol or sweets.
In 2017, the TRPR (Tobacco and Related Products Regulations), which was a revised interpretation of the EU Commission's TPD (Tobacco Products Directive), came into effect in the UK. This piece of legislation aimed to ensure the safety of vape products include vape kits and included the limitations of nicotine-containing e-liquid bottles to 10ml, vape tank sizes to 2ml as well as nicotine strength of e-liquid to a maximum of 20mg. Current UK laws state the sale of e-cigarettes and e-liquids is legal to over 18s only, but many shops allow minors over the age of 12 to purchase nicotine-free e-liquid as all the ingredients in it are safe compared to nicotine e-liquid. Technically it is illegal for a minor to purchase any vaping products or any items associated with e-cigarettes but it is perfectly legal for a minor to use an e-cigarette, nicotine or nicotine-free. These are UK laws only.
Legal History.
Many countries are not approving electronic cigarettes as a less harmful alternative to traditional cigarettes. 
The sale of tobacco cigarettes with flavor (except menthol) has been stopped in some countries but not yet in Europe or the USA. 
The EU is testing if the product is bad to the health and safety of persons in general. They are also researching if electronic cigarettes can be called a medical product. In 2009 the U.S. Food and Drug Administration (FDA) was provided authority by Congress to ban all sales of cigarettes with flavors, except menthol.
Because many countries are not sure if electronic cigarettes are a medical product, each country has their own opinion and rules on e-cigarettes.
Health institutions are more and more interested in E-cigarettes because they are much cheaper than smoking regular ones, making them popular alternative. In the United States of America, individual states have different rules on use and sale of electronic cigarettes.
Apart from medical reasons e-cigarettes have also been banned in airport and other high population-density public places due to a number of incidents where they have been a cause of fire.
The United Kingdom are one of few countries to have government support for electronic cigarettes and e-liquids. Specifically, the NHS recommend e-cigarettes as a less harmful alternative to smoking
In Australia vapes are legal but is publicly recommended not to use electronic cigarettes. Such advertisements are "vape truths" also known as "puff or pass" which is displayed on advertisements on social media platforms and public broadcasting television. Western Australia has no laws limiting the sale of vapes to underage minors, and nicotine laws regarding vape pens. 
New Zealand has a Vaping Regulatory Authority to manage the sale of electronic cigarettes. 
References.
4. https://www.health.gov.au/health-topics/smoking-and-tobacco/about-smoking-and-tobacco/about-e-cigarettes updated 11 august 2021.