Well I play electric guitar and sometimes I will write a really good riff for a song but then when I put something after it, it will not go with it at all. Its like when I put two parts together, they never match up. Is there anything I can do to help this problem?
Im not under the alkafluence of inkahol that some thinkle peep I am
Make sure they fit, for example if you write an acousic folk riff dont put some shred death metal riff ater it, make shure they are the same style
play your riff...than improvise a progression or whatever right after. If that didn't fit, than try something else. That will just help you retain the initicial (sp?) feeling of the riff and the focus of your song.
Please help me by reviewing my lyrics
Look up scales. Have a chord progression for the basis of the song, and then write something over that. Creating a song composed entirely of randomly assorted, disconnected riffs can only go so far (which is not very far at all).

If you're not already following a song...
Well, it may not go together, because it just doesn't, it's as simple as that. Make sure the two things are in the same key, and that you have a smooth transition between them, usually if you jump right between two things it's too drastic for the listener and doesnt sound right.