What is the meaning of Off_the_rails?

In an abnormal manner, especially in a manner that causes damage or malfunctioning.

Insane.

Off the intended path.

Out of control.

Used other than figuratively or idiomatically: see off, rail.

Source: wiktionary.org