Kung Fu is a western term for Chinese martial arts and actually means "skill" or "ability". Combat and war-arts have existed in China, as well as other countries, from time immemorial.
In the Shao Lin temples (there were allegedly two, one northern and most famous in Henan province and one supposedly in Fujian province), monks studied and developed the art of Kung Fu. They created a system of movements based upon the various ways animals defend themselves. The monks learned these defense techniques and adapted them to the human body's capabilities.