The term lunatic refers to a person who is considered mentally ill or insane. It originates from the belief that mental disorders were caused by the phases and positions of the moon, which was known as "luna" in ancient times. The term has since been used colloquially to describe someone who behaves irrationally or erratically.