This word occurs in Judges 12:5-6
And the Gileadites captured the fords of the Jordan against the Ephraimites. And when any of the fugitives of Ephraim said, “Let me go over,” the men of Gilead said to him, “Are you an Ephraimite?” When he said, “No,” they said to him, “Then say Shibboleth,” and he said, “Sibboleth,” for he could not pronounce it right. Then they seized him and slaughtered him at the fords of the Jordan. At that time 42,000 of the Ephraimites fell.
So the word was used as a test of regional origin based on the different dialects used by people from Gilead compared to people from Ephraim.
The word “shibboleth” is from the Hebrew word שׁבּלת which means the part of a plant containing grains (e.g., an ear of corn). The meaning of the word is irrelevant in the passage above — it was simply a word that Ephraimites found hard to pronounce in the same way as the Gileadites. Most likely the Ephraimite dialect lacked a “sh” phoneme while the Gileadite dialect included it.
These days, “shibboleth” means any word or practice used to distinguish members of a group from outsiders. This meaning is based on the biblical passage above. For example, during World War II, US soldiers required people to say “lollapalooza” to identify Japanese spies or fugitives as they often pronounced the letter L as R. Male circumcision is an example of a non-verbal shibboleth that has been used to identify Jewish men.