Nicotine is an alkaloid
Alkaloids are a group of naturally occurring chemical compounds that contain mostly basic nitrogen atoms. This group also includes some related compounds with neutral and even weakly acidic properties. Also some synthetic compounds of similar structure are attributed to alkaloids...

 found in the nightshade family of plants (Solanaceae
Solanaceae are a family of flowering plants that include a number of important agricultural crops as well as many toxic plants. The name of the family comes from the Latin Solanum "the nightshade plant", but the further etymology of that word is unclear...

) that constitutes approximately 0.6–3.0% of the dry weight of tobacco
Tobacco is an agricultural product processed from the leaves of plants in the genus Nicotiana. It can be consumed, used as a pesticide and, in the form of nicotine tartrate, used in some medicines...

, with biosynthesis
Biosynthesis is an enzyme-catalyzed process in cells of living organisms by which substrates are converted to more complex products. The biosynthesis process often consists of several enzymatic steps in which the product of one step is used as substrate in the following step...

 taking place in the roots and accumulation occurring in the leaves. It functions as an antiherbivore chemical
Plant defense against herbivory
Plant defense against herbivory or host-plant resistance describes a range of adaptations evolved by plants which improve their survival and reproduction by reducing the impact of herbivores. Plants use several strategies to defend against damage caused by herbivores...

 with particular specificity to insects; therefore nicotine was widely used as an insecticide
An insecticide is a pesticide used against insects. They include ovicides and larvicides used against the eggs and larvae of insects respectively. Insecticides are used in agriculture, medicine, industry and the household. The use of insecticides is believed to be one of the major factors behind...

 in the past, and currently nicotine analogs such as imidacloprid
Imidacloprid is a nicotine-based, systemic insecticide, which acts as a neurotoxin and belongs to a class of chemicals called the neonicotinoids. Although it is now off patent, the primary manufacturer of this chemical is Bayer CropScience,...

 continue to be widely used.

In low concentrations (an average cigarette
A cigarette is a small roll of finely cut tobacco leaves wrapped in a cylinder of thin paper for smoking. The cigarette is ignited at one end and allowed to smoulder; its smoke is inhaled from the other end, which is held in or to the mouth and in some cases a cigarette holder may be used as well...

 yields about 1 mg of absorbed nicotine), the substance acts as a stimulant
Stimulants are psychoactive drugs which induce temporary improvements in either mental or physical function or both. Examples of these kinds of effects may include enhanced alertness, wakefulness, and locomotion, among others...

 in mammal
Mammals are members of a class of air-breathing vertebrate animals characterised by the possession of endothermy, hair, three middle ear bones, and mammary glands functional in mothers with young...

s and is the main factor responsible for the dependence-forming properties of tobacco smoking
Tobacco smoking
Tobacco smoking is the practice where tobacco is burned and the resulting smoke is inhaled. The practice may have begun as early as 5000–3000 BCE. Tobacco was introduced to Eurasia in the late 16th century where it followed common trade routes...