Clonazepam is used to prevent and control seizures. This medication is known as an anticonvulsant or antiepileptic drug. It is also used to treat panic attacks. Clonazepam works by calming your brain and nerves. It belongs to a class of drugs called benzodiazepines.