The answer below has been shamelessly ripped off from the A Song of Ice and Fire wikia.
The song of ice and fire is a subject of a prophecy and is eponymous for the "A Song of Ice and Fire" series of book. The song of ice and fire is said to be the prince that was promised's but the content of the actual song remains unknown.
At the House of the Undying, Daenerys Targaryen sees a man (Rhaegar Targaryen) and overhears him talking to a woman (Elia Martell) nursing a baby; "Aegon… What better name for a king… He is the prince that was promised, and his is the song of ice and fire"
However, neither Daenerys nor Ser Jorah Mormont know what the song of ice and fire means. It is implied that there is a connection between the song, the promise, and Daenerys herself.
The phrase "ice and fire" is also mentioned in the Reeds' oath of loyalty to Bran Stark. The phrase "ice and fire" appears two more times in the books as an example of opposites however, the song and the promise are never mentioned again, and the song itself remains a mystery.
George R. R. Martin has said that he was influenced by Robert Frost’s poem Fire and Ice
Interviewer : Why your saga is called A Song of Ice and Fire, because of the Wall and the dragons or is something more beyond that?
GRRM : Oh! That’s the obvious thing but yes, there’s more. People say I was influenced by Robert Frost’s poem, and of course I was, I mean... Fire is love, fire is passion, fire is sexual ardor and all of these things. Ice is betrayal, ice is revenge, ice is… you know, that kind of cold inhumanity and all that stuff is being played out in the books.