I have on a couple occasion, heard a song that addressed a certain subject - and it inspired me to tackle that same topic but tell the story in a different way. As DM60 posted - is that a rip off or an inspiration?
Inspiration. Lyrically/subject matter wise, it's virtually impossible not to cover ground that someone else has used in the past. Certain lines crop up frequently. It's a different matter musically though.
In 1987 "Mothers of the disappeared" turned up on U2's "The Joshua Tree" and the following year, "They dance alone" turned up on Sting's "Nothing like the Sun" and they both had exactly the same subject matter, the fate of those that mysteriously disappeared during the military junta's dictatorships in Chile and Argentina and the wives/sisters/mothers that had their menfolk vanish. But I don't see this as one being a rip off of the other.
I try to watch myself but it's really easy to be unaware that you're copying something or part of something (by the way, how much needs to be copied to be deemed "ripped off" ?) that has lived in your memory for years.
a great lesson in subconscious plagiarism.
It's kind of happened to me twice. Around 1994, I wrote a song called "History of a much loved band" and there's a bass and drum part that forms the basis of the second section. A couple of years later, I was making a video for my mate that had just had a baby {it was various film footage of her kids} and I was using that section of the song as background music. And as I was listening back, it struck me how similar it was to the bass and drum middle 8 of "Love in the midnight" by Styx. It's not a rip off but it's so close, it's hairy !
Then a couple of years after my mate and I had recorded a strange song {well, it was lyrically strange !} called "Picture house" {using the analogy of the mind as a cinema ~ they used to call them picture houses when I was kid}, I was listening to the Osmonds' "Hold her tight" and I thought the heavy section of "Picture house" bore an annoying similarity to the riff the Osmonds' used, which they had admitted was a rip of Led Zeppelin's "Immigrant song" although the section of Picture house sounds nothing like Zep's riff.
As for purposely borrowing something from another song.........I haven't done that yet.
I did once. My mate wrote this song "Hupernikao" {it means 'more than conquerors'} and we decided to do it in a kind of Latin~ish style. Anyway I felt it needed an intro, mid break and outro to give it a bit of contrast so when my mate on drums and I recorded the basis on guitar and drums, I took the riff of Led Zeppelin's "Dazed & confused" and pretty much used it verbatim.
It was an ironic joke on my part. They had taken so many Black artists' music and refashioned them, uncredited, that I thought I'd do likewise but the other way around ! My friend Esther, that had written the song hadn't even heard of Led Zeppelin. She still may not have ! But as mere hack hobbyists we're unlikely to be sued.