The practice of the tapping your opponent or mat to signal your submission to his or her technique is an old one in the martial arts. Judo has had this feature since at least the early 20th Century and the concept of tapping out was used long before judo's development by many jujitsu ryu's. After all, in learning the martial arts, there must be a way to signal tori nonverbally that his choke is indeed effective.
Although the standard tapout is three quick taps in succession, in my experiences participating in and observing judo, sambo, submission wrestling, and MMA contests such as the UFC or Pride is that any two or more quick taps to the mat or opponent will bring the match to a stop so long as the intention is clear to the referee. It is my observation that the two tap convention is the one most commonly used in martial arts learning environments. In competition, its best to keep tapping until the other guy lets go.
The body part tapping out is not necessarily the hand. It is permissible and not uncommon to see players in judo tap with their feet. Sometimes, it is physically impossible to tap out using your hands, for example, if you have been caught in the impractical, but still very cool, double armbar. In the course of grappling, it is not at all unusual to have both arms not joint locked but still immobilized.
An odd situation often arises in aikido and hapkido where a wrist lock places uke in such a position that he is unable to reach tori or the mat with his hands, nor able to make a loud enough noise with his feet. You will then often see uke tapping loudly on his own body to signal to tori that his technique is indeed effective and that he can let go now.
SharQ has encouraged me to add a section on verbal submission: The alternative to tapping out is to verbally submit. This is done in different a different manner depending on where and what activity you are participating in. In judo where kiais are not discouraged, it is customary to call out mattei in a clear voice. On the other end of the spectrum are sports such as sambo where any loud outcry while grappling may be taken as a sign of submission. In most martial arts classes, a loud "Stop!" in the customary language usually suffices. It is my observation that there is little standardization of the verbal submission as I have seen different branches of the same art verbally submit in different manners.
I believe the tapout's use in American prowrestling was the inevitable result of the crossing over of UFC athletes as well as Americans with experience in Japanese pro wrestling federations. Many, if not most, Japanese wrestlers have extensive martial arts backgrounds and the idea of tapping out has always had a place there, particulary in the shoot style leagues.