In the psychology and psychiatry, the term mania is used to describe a distinct phase or episode of a bipolar disorder, where an affected individual experiences elevated, euphoric or irritable mood, increased energy, racing thoughts, decreased need for sleep, impulsive behaviors, increased activity and excessive involvement in pleasurable tasks or activities.
Mani(a) or mania is usually contrasted with hypomania, which involves similar symptoms, but they're less severe. Mani(a) is often a period of significant disturbance, while hypomania can involve some positive effects on individuals productivity and enthusiasm.
To summarize, maniacal behavior refers to a state of extreme excitement, agitation, or irrational behavior. It's often associated with a mental disorder, particularly bipolar disorder, but can also be used more generally to describe someone's excessive or uncontrollable behavior.