"Catnip" is the common name for a perennial herb of the mint family called "Nepeta cattaria". It is native to Europe and is an import to the United States and other countries. The catnip plant is now a widespread weed in North America.
Given to the right cat, catnip can cause an amazing reaction! The cat will rub it, roll over it, kick at it, and generally go nuts for several minutes. Then the cat will lose interest and walk away. Two hours later, the cat may come back and have exactly the same response.
Because there really isn't any scent that causes this sort of reaction in humans, catnip is hard for us to understand. However, it is not an uncommon behavior in animals that rely heavily on their noses. For example, there are many scents that will trigger intense hunting behavior in dogs, and other scents will cause dogs to stop in their tracks and roll all over the scent.
Although no one knows exactly what happens in the cat's brain, it is known that the chemical nepetalactone in catnip is the thing that triggers the response. Apparently, it somehow kicks off a stereotypical pattern in cats that are sensitive to the chemical. The catnip reaction is inherited, and some cats are totally unaffected by it. Large cats like tigers can be sensitive to it as well.
The reaction to catnip only lasts a few minutes. Then the cat acclimates to it, and it can take an hour or two away from catnip for the cat to "reset." Then, the same reaction can occur again. Very young kittens and older cats seem less likely to have a reaction to catnip.