Like somebody said elsewhere, you need to learn the structure of songwriting. Best bet is to buy or borrow a book on songwriting to learn how the hitmakers do it. Get a rhyming dictionary and thesaurus.
Get it so that you have multitracking ability on your computer (128 tracks for instance) so that you don't have any limitations. Get some VSTi instruments and a good multi-effects unit for your guitar.
Lay down a three minute drum pattern divided up into verses, chorus's and a bridge. Rather than using a drum machine at first, try using some royalty free drum loops. Match several of them together to create a stereo drum track.
The loops will give you more ideas to bounce around. Later if you want you can either totally replace or beef up the loops with the drum machine. Once you have the drums down, just play whatever comes naturally to you on guitar keeping in mind the structure you're going for (verse, chorus, verse, chorus, bridge, chorus, chorus) Lay down a temporary bass pattern and a couple more guitar tracks just temporarily for now.
Then find some time where you can be totally alone with nobody listening and sing your butt off with nonsense words... anything that fits the song. Do ten tracks of different ideas.
Now put the song away for a few days.
Come back to it with fresh ears and match real lyrics up to your nonsense ones. At this point you can usually tell if the song's working or not.
Replace the guitar tracks, come up with a proper bass pattern. Use a VST synth to lay down some strings or something and voila, a song.
If you want an average song, spend a couple of days at it.
If you want a great song, keep working on it for months or even years until you've perfected it.
Repeat the above steps about 1000 times until it comes naturally to you.
I ain't guaranteeing it'll work but if you do it constantly every day, after about a decade or two you can put a half decent song together.