Mostly it is just plain darn hard work with my favorite fountain pen, and a pad of yellow legal paper in front of me. I like to start out writing the lyric first, since this seems to be the most difficult part of the process. If I have a title, that keeps the lyric writing phase in phocus. Otherwise, I use a writer's trick; I just start writing without regard for spelling or punctuation. I write free form this way for maybe five, maybe ten minutes, then put my pen down, close my notebook, and have another cup of coffee, or go for a walk, or post a few messages on the Mudcat. Next day, I come back to my notebook, and see what I have written. If something leaps out, all is good and well.
The other method I use is to consult the mailing list from the local songwriter's circle. They issue monthly song challenges such as this month's challenge to write a song about a childhood memory. That was easy, I am writing one about the Columbus Day Storm of 1962 in Oregon.
It's pretty rare that a song just gets handed to me from the ether somewhere. But when it does, what a rush!
OK, so now I have the lyric just the way I want it after having gone through maybe three, or four drafts. Then and only then do I pick up my guitar or my banjo and begin to compose the melody. By this time, the lyric will have already suggested the meter if not the melody too.
Well, that's about it. Jim