Identify the key parts of the song from the lyrics. Generally, lyrics will lend themselves to a structure. For example, if the lyrics have a chorus that repeats several times throughout the song, broken up by different verses, you have formed an idea of the structure of the song. Keep this in mind when you compose the music. Gather all the information you can from the lyrics, even if it is a general idea of how they are going to be sung.
Decide which key you wish to play the song in. After you have picked a key--for example, C--you can find out which chords you can include in your song. Choose a scale in the key of C (ordinarily, this would be the major scale, and number the notes by degrees. For example, the C major scale is C, D, E, F, G, A and B, which are first, second, third, fourth, fifth, sixth and seventh, respectively. Generally, the major chords of the first (or root), fourth and fifth sound nice together, and can be used as a basic starting point for your song.
Try out a basic, generic song structure, such as the 12 bar blues, and see if it can fit to your lyrics. The easiest method of writing a chord progression is to use something that has already been accepted as a song structure, such as the 12 bar blues. This is played by playing four bars of the first, followed by two of the fourth, two of the first, one of the fifth, one of the fourth, another bar of the first and a final bar of the fifth.
Add in more interesting notes as you wish. Just using the first, fourth and fifth major chords of any scale is going to produce uninteresting songs. You can also add in the second, third and sixth as minor chords. In the example, with a song in C major, you can also play A minor, D minor and E minor as part of your song. Minor chords create a sad mood, and should be used to add another emotional dimension to your song. For example, you can play the chords C major, A minor, F major and G major in a loop as a chord progression. The C major chord is the root chord, and you should use it more heavily than the others to firmly establish the key. It is also wise to start your song on the root note.
Change key for the last chorus if you wish to give the song a particularly uplifting ending. Key changes in the last chorus are common in popular music, and can be done by playing the same chords (for example, the first, sixth, fourth and then fifth) as the original chorus but changing the key of the scale. For example, play based on the D major scale instead of the C major scale.