To answer the last point first, songs, paintings, books, films, and other creative works are all protected by copyright, and the same general rules apply. Sometimes those rules look at "how much" of a work is used by another, and it is easier to use all of a poem or a song than all of a novel.
This is a question, largely, of whether a new work is a derivative work of an existing, protected work. (You are legally free to be derivative of Shakespeare if you like, he is long out of copyright.) The concept of "fair use" also is relevant, in a US context. See This question and answer for more on fair use.
Using a concept in a generic way is not infringement. The more of the distinctive features of an existing work, or of an existing character from a work, that you use, the more likely it is that the new work will be judged to infringe.
Also, while the market effect, mentioned in another answer is important, it is not the only test. Making a clear sequel to an existing work, or using as a central character a well-known and distinctive character form an existing (protected) work, is likely to be considered infringement.
Transformative use does matter. This means not just another medium -- indeed converting a novel into a film, say, is not considered transformative at all. Rather, it means using elements for a different purpose. The most obvious case is parody, where the elements of the original work are used to comment on the original, or to make a point very different from the sort of point the original was making. Quoting a poem in a book of literary theory, to analyze its construction, is transformative. Quoting it in a novel to have the characters respond to it in much the way that the poet presumably intended his audience to respond is not. Having them respond in a very different way -- having a character treat Feeling Groovy as a lament, say, or "The Unquiet Grave" as a love song, might well be transformative.
The amount of a work quoited or used matters, but it is not a simple or clear-cut rule of X% may be used. In the case of Harper & Row v. Nation Enterprises, 471 U.S. 539 (1985) the US Supreme Court ruled that a magazine article which quoted only some 300 words from a 500-page book was a copyright infringement, because those words were "the heart of the book" according to the Court. That is a somewhat extreme case, but it shows the possibilities.
The more distinctive, point-by-point similarities there are to the source, the more likely it is to be considered infringement. And the more significant, original content there is, the less likely.