Maniac is an obsolete term for an individual who experiences extreme excitement, delusions, and obsession or mania. For instance, a patient has been having a hard time sleeping, he has lots of energy, experiences a flight of ideas, and has been talking and pacing incessantly.
Maniac is also a lay term for a psychologically disturbed individual, specially someone who is dangerous. It is also perceived as a derogatory term for individuals with mental disorders. For example, a homeless person who has hit an unsuspecting passerby might be referred to as a maniac.