It's called a mondegreen, such as scuse me while I kiss this guy or there's a bathroom on the right:
1 A mondegreen is the mishearing or misinterpretation of a phrase as
a result of near homophony, in a way that gives it a new meaning. It
most commonly is applied to a line in a poem or a lyric in a song.
American writer Sylvia Wright coined the term in her essay "The Death
of Lady Mondegreen," published in Harper's Magazine in November 1954.
2 [Jimi Hendrix, Purple Haze]
A common misheard lyric in the song is "excuse me while I kiss this guy". The actual line is "excuse me while I kiss the sky". In fact, it has even been documented that Jimi Hendrix himself perpetrated this mondegreen by actually using it as a joke while singing "Purple Haze" live in concert, particularly at the Monterey Pop Festival in 1967. In Cheech & Chong's film Nice Dreams, the line is parodied as "excuse me while I kiss this fly".
3 [Creedence Clearwater Revival, Bad Moon Rising] The refrain in the chorus, "there's a bad moon on the rise", is commonly misheard as "there's a bathroom on the right". Fogerty has parodied the mishearing in live performances of the song.