The rules make it illegal for under-18s to buy tobacco and nicotine vapour products, known as NVPs or e-cigarettes.
Anyone buying the products for under-18s will also be breaking the law, with shops selling them required to have an age verification policy and to be registered.
Public health minister Aileen Campbell said: “We know e-cigarettes are almost certainly safer than cigarettes and have a role to help people quit smoking, but we don’t believe children should have access to them - that’s why these age restrictions are so important.
“From today, it is illegal to sell e-cigarettes to, or buy them for, under-18s. Additionally, all retailers selling tobacco or e-cigarettes must be registered and undertake age verification.
“We are working closely with the Scottish Grocers’ Federation to make retailers aware of these changes and what they mean for their daily business.
“A campaign is already under way across Scotland and will continue to run throughout the summer to ensure everyone is aware of these changes to the law.”
The changes were brought in by the Health Act 2016, which also set out restrictions on e-cigarette advertising and a ban on vending machines selling the products.
Both measures are due to be introduced later this year.
Sheila Duffy, chief executive of Action on Smoking and Health (ASH) Scotland, said: “Nicotine is addictive and as there is some level of health risk associated with using these products, it is right that we keep them out of the hands of children.
“With the regulatory framework for e-cigarettes falling into place, now is the time to remind people that smoking tobacco is by far the more harmful activity.
“There are still 30-40 young people in Scotland taking up smoking every day and the priority must be for further action against those retailers who sell to children and to challenge the attitudes amongst adults who buy cigarettes on their behalf.”