A coon song is a comic song, in fashion from about 1880-1920. The song was song with humour and in the dialect of African Americans at that time.
The term is not thought to be racial though it later became that.
It is thought to come from African American slaves who were not permitted to eat the "muscle meat" of chicken, pork or beef that we today normally eat. Instead they were relegated to such after products as organ meats of those animals, such as brains (head cheese), stomach (tripe) and intestines (chitterlings). When they desired the "muscle meat" they had to hunt and kill smaller animals such as possums (short for opossums), rabbits and raccoons. Raccoons soon became the most popular "muscle meat" for the slaves.
However, the term "coon" became used for any such meat as rabbits or possum. For such shows as Carve Dat Possum (1876) and A Possum Up A Tree use the term "coon" when they clearly mean possum.
Sadly enough the coon songs came to represent the image they are identified with. Even African American composers such as Ernest Hogan (the man who coined the phrase "ragtime"), used coon songs which "degraded" the value of African Americans, the worst example being his All Coons Look Alike To Me. Probably the most prolific of the black composers to join in was Bob Cole who wrote dozens of songs such as, No Coons Allowed and I Wonder What The Coon's Game Is?.
Of course being black in no way excuses the songs, but it is a good educational lesson reflecting on the reality of the times, and most importantly the racial elements of the songs most often, can easily be re-written to keep the song integrity.
But it is a real reflection of how black people of the times and the self-image they had. I often reflect on this as a gay man from the times of the early 70s where it was enough to show a gay man on TV, of course even though he was usually shown to be effeminate and mincing, it was seen as a victory because the mainstream had to acknowledge those people existed and mattered.