Meaning of kiai
The word kiai is made up of the ideogram "ki," which means energy or spirit, and the ideogram "ai," which means matching or unite. Many Far Eastern people believe a force flows through all things. This force is called ki in Japanese and chi (or qi) in Chinese. Therefore, kiai means "working with ki" or "harmonizing ki" or "uniting the spirit." E. J. Harrison, in his book The Fighting Spirit of Japan, describes it as the "art of perfectly concentrating all one's energy, physical and mental, upon a given object with unremitting determination so that one achieves one's goal." Some simply call it a "spirit yell"
How kiai originated
Folklore has it that, in the early days, a village would have one warrior who would proclaim himself the master warrior. When a would confront the warrior, he would issue a challenge to fight by using a kiai yell which the warrior would answer with his own yell. When the winner emerged, he would again issue a kiai yell. The winner would now be the master warrior of the village, either the old one again or a new one.
Actually, it is instinctive for humans to emit some type of grunt or growl when exerting a lot of physical force, such as lifting a heavy object. Warriors throughout the centuries have refined this into a yell.