Ambien is a prescription medication used to treat insomnia. It contains the active ingredient zolpidem, which is a sedative-hypnotic that helps initiate and maintain sleep. Ambien works by enhancing the activity of GABA, a neurotransmitter that promotes relaxation and sleep.