Yes good question with some good answers. Well unfortunately it is not something that happens overnight. One doesn't wake up one morning and say "I know I'm going to be a songwriter"... For me, many years ago, I tried to write songs with a guitar and they always came out so slushy that a penguin would fall-over. BUT I kept at it. Now with six amature albums under my belt I feel like a bit of an expert and "hero" in my own little world. I usually start with my acoustic guitar and these days I find a multi-track recorder almost invaluable. I will record some chords that I think sound nice, or rocky or strange and them develop a Bassline usually with fifths, thirds and tonic. Then (as has been already stated) I sing la la la over the top and maybe record a couple of tracks. Then I go and have a cup of coffee and cigarette and come back and listen for something that is interesting. Sometimes I skip the la la la part and just put myself on the spot by pressing record and letting it all flow.
Another method I use is to start with different instruments. I will write a completely different song which stands out from the rest if I start with a bassline after doing numerous songs with guitar. Or start with a drum pattern. I think it is probably about one song out 50 that I start with a vocal melody.
Another thing I do is to set aside a day to write two songs. And force yourself! The first time I did this, I wrote two of my best songs that I still play today.
Bla bla bla
I hope this has been useful!
Cheesey pops Tony