From U.S. Dept. of Veterans Affairs:
The Code Talkers used native languages to send military messages before World War II. Choctaw, for example, was successfully used during World War I. But the Marine Corps needed an “unbreakable” code for its island-hopping campaign in the Pacific. Navajo, which was unwritten and known by few outside the tribe, seemed to fit the Corps’ requirements.
Twenty-nine Navajos were recruited to develop the code in 1942. They took their language and developed a “Type One Code” that assigned a Navajo word to each English letter. They also created special words for planes, ships and weapons.
But just because a person understood Navajo didn’t mean they could understand the code. While a person fluent in the language would hear a message that translated into a list of words that seemingly had no connection to each other, a code talker would hear a very clear message.
Here is an example:
Navajo Code: DIBEH, AH-NAH, A-SHIN, BE, AH-DEEL-TAHI, D-AH, NA-AS-TSO-SI, THAN-ZIE, TLO-CHIN
Translation: SHEEP, EYES, NOSE, DEER, BLOW UP, TEA, MOUSE, TURKEY, ONION
Deciphered Code: SEND DEMOLITION TEAM TO …
In addition to being unbreakable, the new code also reduced the amount of time it took to transmit and receive secret messages. Because all 17 pages of the Navajo code were memorized, there was no need to encrypt and decipher messages with the aid of coding machines. So, instead of taking several minutes to send and receive one message, Navajo code talkers could send several messages within seconds. This made the Navajo code talker an important part of any Marine unit.