Kung-fu is the most brutal and efficient way to injure, maim, or kill another human being ever adopted as a way of life by a sacred order of pacifist monks.
In the olden days, some Chinese dudes were badasses. Then, Shaolin came.
Seriously, that's about as clear as it gets. Estimates of the origin of Chinese martial arts vary by as much as 2,000 years, depending on whom you ask. So if that's the best we can do for "when," then you can forget about the "who" the "where" and the "how."
This dude looks pretty old; let's just say he did it:
In 495 C.E. a Buddhist monk from India visited the Shaolin monastery in China. Upon his arrival, Bodhidharma discovered the Chinese monks to be a bunch of pasty-faced doughboys who never got any exercise. Inexplicably, he thought this was inappropriate for a group of people whose full-time job was worshipping Buddha.
In any case, Bodhidharma was in pretty good shape himself after hiking halfway across India, China and the Himalayas to get there, so he immediately took over and instituted an exercise regimen consisting of some stationary meditation postures that were popular back home (basically, yoga).
The monks - living in the mountains in pre-historic freaking China - had nothing better to do, so they fucking ran with it. Within a few years, Shaolin Kung-fu was born.*
*Please note, there is as good a chance as not that the above story is 100% bullshit. Historians agree that Bodhidharma visited the Shaolin temple. But when, what he contributed while he was there, whose couch he slept on and whether or not he porked the abbott's sister are all matters for debate. We have presented a common version of the legend, and leave it to the discerning reader to make up her own mind.
Kung-fu has had a sketchy relationship with the various incarnations of Chinese governments over the years. Around 221 B.C.E., Emporer Qin began to use martial arts in his military, effectively legitimizing and approving the practice of Kung-fu. When the Manchurians took over in 1644 C.E., they outlawed and suppressed all martial arts, forcing practitioners to train in secret for nearly 300 years. When the Qing dynasty fell in 1911, Kung-fu came back in favor and was again practiced freely - but only until the communists took over in 1949, when it was co-opted by the state and whitewashed, cleansing it of any real martial intent. Matters got worse when Mao Zedong began the Cultural Revolution in 1966; many masters were killed and much knowledge was destroyed.
It was during this most recent period of oppression that many Kung-fu masters fled China and began teaching foreigners the secrets that had previously been taught only to other Chinese. We can therefore thank Chairman Mao and the atrocities of his brutal regime for, ultimately, giving the world Grandmaster Paulie Zink:
Many styles of Kung-fu are based on the movements of animals. With sufficient discipline and practice, you can learn to hurt your neighbors while pretending to be a monkey, a tiger or an insect - but not a bear. Will someone please fucking invent Bear Kung-fu already?
Though many different animal styles exist, perhaps the most famous are known as The Five Animals: Tiger, Leopard, Crane, Snake and Dragon. (Seriously - Dragon. There's a style based on the movements of a fictional flying lizard, but still no Bear. WTF, China?)
To remember the five animals, just remember this simple mnemonic: "TLCSD - the Tiger ate the Leopard who ate the Crane who ate the Snake, and Dragons are totally fucking made up."
Kung-fu encompasses many different training methods, but all with the shared goal of one day beating the shit out of a theoretical future opponent. Some of the more common methods are outlined below.
Today, kung-fu is practiced all over the world, in a nearly infinite variety of forms. Hundreds of different styles exist; within each style, some schools are single, independent institutions, while others are nationwide chains; some schools focus on preparing for competitions, while others forego competitions to focus on useful, real-world combat techniques, and still others are focused exclusively on cardiovascular fitness; study at a modern school can encompass any one or more of the training methods mentioned above.
Regardless of which of the above categories they fall under, western schools, for reasons as yet undetermined by science, are usually run by small, insane, white men with no-joke moustaches.
In popular western culture, kung-fu is frequently represented by a small Asian/Hispanic/American Indian - or, just plain David Carradine - wearing colorful bathrobes, punching everything in sight and muttering incoherent platitudes about nature.
And frankly, we're just fine with that.