Some songwriters come up with lyrics and add the melody later, others do it in reverse. When writing the song "Yesterday," Paul McCartney added the lyrics to an existing melody. Until he'd written the final lyrics, he used the words "Scrambled eggs" as a place-holder for the word "Yesterday."
The key of a song determines how high or low the singer has to sing. All singers have a limited amount of keys that they are comfortable singing in. Songwriter Guy Chambers cites key as being a determining factor in whether a singer can convincingly deliver a song, or not.
The melody, or tune, is the sequence of notes that make up the song. Typically the singer carries the melody. Melodies can be complex or simple. There is no right or wrong approach.
This is the memorable part of the melody. The hook typically happens in the chorus and frequently includes key lyrics, for example "God only knows what I'd be without you" from "God Only Knows" by the Beach Boys.
The verse is the section of the song where you tell the story. Typically the accompaniment is more low-key and the lyrics set the scene. "In the town, where I was born, lived a man who sailed to sea from "Yellow Submarine" by The Beatles is an example of scene-setting lyrics.
The chorus is the pay-off to the verse. Sometimes, the chorus is a different key and features a more prominent melody. This is where the key message of the song is emphasized. For example, "Schools out for Summer, Schools out for ever" hammers home the joyous, rebellious message that Alice Cooper had alluded to in the verses of his hit song "School's Out."
Accompaniment influences the mood and feel of a song. By comparing Sheryl Crow's laid back acoustic version of "Sweet Child O' Mine" with the Guns 'N' Roses heavy, epic-sounding original, it's apparent how much the musical accompaniment can influence the sound of a song.
Harmony describes the relationship between two or more notes. For example a C note and an E note together create a major third harmony, this is a characteristically "cheerful" sounding harmony. Songwriters use harmony to emphasize and add depth to part of a melody. The open lines to "I Get Around" by the Beach Boys are delivered in harmony to bombastic effect.