Catnip Explained
Catnip plants (Nepeta cataria and other Nepeta species) are members of the mint family. Originally from Europe, Asia, and Africa, it spread across the globe as early as the 1600s. Catnip can be found in many an herb garden, and also grows in a lot of places as a weed.
It is used as a medicinal herb (made into a tea, catnip has calming properties similar to chamomile) and as a treat for cats.
Catnip is nonaddictive and completely safe in small amounts for cats. The response they have to it is a chemical sensing response. It all boils down to the fact that it’s a natural insect repellant.
The way it works is that, when the cat smells it, it stimulates the cat’s μ-opioid receptors, which makes the cat feel good. They want to keep coming back to that plant. That’s important because its insect repelling properties will work best if they rub it all over themselves.1
When ingested, it usually causes a calming effect. If they ingest a lot of it, it can cause stomach upset, nausea, and vomiting, which will pass without lasting effects.
The effect only lasts 10-15 minutes, and it takes about an hour before it will work again. Don't give it to them very often because they will get used to the smell. The general recommendation is once or twice a week.
Most cats (including big cats!) will have an active response to catnip (rolling around, rubbing up against things, playing, etc.). Others have a more passive response (sitting in sphinx-like position, mellow mood). Some cats will have an active response sometimes, and a passive response at other times.2
Kittens don’t have an active reaction to it because their opioidergic system is not yet fully developed.
We used to think cats were attracted to it because it mimicked pheromones, but cats don’t exhibit a flehmen response as they would if they thought they detected pheromones, so it never made much sense. Now we know.
[This post was adapted from my answer on Quora here.]