Ambien, also known by its generic name zolpidem, is a prescription medication used to treat insomnia. It belongs to a class of drugs called sedative-hypnotics, which work by slowing down brain activity to help you fall asleep. Ambien is typically recommended for short-term use, as it can be habit-forming if taken for long periods of time.