So, in the future, when you're wondering "where a word comes from," there's a good word to know: Etymology. Etymology is the study of words histories.
From the Wikipedia article on "Rapping", there is a section on etymology and usage:
The English verb rap has various meanings; these include "to strike, especially with a quick, smart, or light blow",[17] as well "to utter sharply or vigorously: to rap out a command".[17] The Shorter Oxford English Dictionary gives a date of 1541 for the first recorded use of the word with the meaning "to utter (esp. an oath) sharply, vigorously, or suddenly".[18] Wentworth and Flexner's Dictionary of American Slang gives the meaning "to speak to, recognize, or acknowledge acquaintance with someone", dated 1932,[19] and a later meaning of "to converse, esp. in an open and frank manner".[20] It is these meanings from which the musical form of rapping derives, and this definition may be from a shortening of repartee.[21] A rapper refers to a performer who "raps". By the late 1960s, when Hubert G. Brown changed his name to H. Rap Brown, rap was a slang term referring to an oration or speech, such as was common among the "hip" crowd in the protest movements, but it did not come to be associated with a musical style for another decade.[22]
Rap was used to describe talking on records as early as 1970 on Isaac Hayes' album ...To Be Continued with the track name "Monologue: Ike's Rap I".[23] Hayes' "husky-voiced sexy spoken 'raps' became key components in his signature sound".[24] Del the Funky Homosapien similarly states that rap was used to refer to talking in a stylistic manner in the early 1970s: "I was born in '72 ... back then what rapping meant, basically, was you trying to convey something—you're trying to convince somebody. That's what rapping is, it's in the way you talk."[25]
Sometimes said to be an acronym for 'rhythm and poetry', this is not the origin of the word.[26]