Check out Austin Kleon’s superb little book, Steal Like an Artist. Lots of great advice.
Musicians steal all the time. Chord progressions can’t be copyrighted, musicians often borrow a progression from a well-known song and put a new melody over the top of the chords. The uber-standard chord progression in the jazz world is “Rhythm Changes,” the chord changes from the Gershwin brothers’ tune “I Got Rhythm,” used in hundreds of songs, including The Flintstones theme.
Herbie Hancock stole a melodic idea for his hit album Headhunters (the super-hit song Watermelon Man–see below) from other master improvisers, improvisers not too many people know about: the Pygmy people (specifically, Mbuti Pygmies of Northeastern Zaire). A recent fascinating study of how Pygmy people react to Western music found that their reaction to music we find fun (The Cantina Band song from Star Wars) or creepy (the Psycho soundtrack) are totally different. Here’s that story.
Some musicians (like Erin McKeown, for example) sometimes use composition, or songwriting, as a way to practice. It’s a great idea, because the act of creation engages you deeply when you’re working through the sounds to get them just right. There is also lots of listening and self-critique, another trait of great practice. Learn more about it in The Practice of Practice (free shipping).