Rainbow is a compound noun. A compound word is a single word made up of two words that each have their own meaning. Rain + bow each have their own meaning but may, or may not be related to the compound word that they form.