A popular story says the Athenians called you an idiot if you skipped politics. It is a good line, but it is not how the Greeks used the word.
The Greek idiōtēs meant a private person. It comes from idios, "one's own, private," the opposite of public. An idiōtēs was an ordinary citizen, as opposed to a magistrate or someone holding public office.
From there the word spread to other kinds of amateur. Etymonline lists several senses. It could mean a common soldier as opposed to an officer, or a prose writer as opposed to a poet. In the New Testament it describes unlearned people. The shared idea is someone without special standing or training. It was sometimes used patronizingly, for an ignorant person or an unskilled worker.
The civic-duty version is much newer. Wikipedia notes that political commentators began reading the word that way as early as 1856. In that reading, Athenians saw private life as selfish and foolish. Thucydides does have Pericles call a man who takes no interest in public affairs "useless." But ancient authors did not use idiōtēs as an insult for non-participants. The modern story joins two separate things.
The word passed into Latin as idiota and into Old French as idiote in the 12th century. English picked it up in the early 14th century. There it could mean a simple, uneducated person or layman. It could also mean someone incapable of ordinary reasoning.
English law then gave it a technical edge. An idiot was a person without reasoning from birth. A lunatic had lost it later. In the early 20th century, psychologists turned it into a clinical grade of intellectual disability. That use is now obsolete. California dropped it from its penal code in 2007. Iowa voters removed it from the state constitution in 2008.
The private sense survives in the word's relatives. An idiom is a turn of phrase peculiar to one language. An idiosyncrasy is a quirk peculiar to one person. Both keep the old meaning of "one's own" that idiot has left behind.