Good tips from Mike T and good questions from Yod!
Everyone uses different techniques for songwriting. Some people write the music and melody first, then craft lyrics to fit - and these people are usually the most ardent that this is the ONLY way to write good songs.
Like Mike T, I write the lyrics first, then will go back and adjust them later if they don't quite fit the music.
For the last year, I've started using 'writing by committee' to get some better-crafted songs. What i mean is asking for feedback at early points in the process. This first started with a local songwriter circle, and now I also use the forums at musesmuse.com. Realize that everyone's suggestions and opinions are just that - their own. Some people's song ideas may not mesh with your own (same holds true for 'producers').
Listening to others' songs, reading their lyrics, and hearing what works and what doesn't also helps me in writing.
My usual method now (but not 100% of the time):
1) Lyrics - first draft. usually a hook or idea will come to me and in one session I'll do this. After I'm done, I'll go back over and amend some lines, move things around if they don't feel quite right.
2) Get feedback on this early lyric version. Others will often pick our things that as the writer I took for granted - like an idea is not clear, or the verb tense is jumbled up.
3) Lyrics go in a pile 'to be worked on' unless I'm feeling very inspired on it.
4) Playing/noddling on guitar or piano, I'll come up with a chord pattern and melody that sounds promising. I'll go to the lyric pile and scan through for a possible match. If something comes together at this point I'll write the chords down on the lyric sheet and then play it over and over as many as a dozen times to set it into short-term memory.
5) As soon as possible, I'll set up a single mic (and plug in the piano, if needed) and record a 1-take demo.
6) This is when I just used to continue adding parts and tracking the whole song - now I get feedback at this point from the songwriter circle meeting, or the online forum on the basic song structure and melody. Things I had never considered before get pointed out - like the chorus melody is too similar to the verse, or its too long overall, or there are too many words being crammed into each melody line.
7) At this point I'll take the feedback into consideration and keep what I like, and change what could make things better and then start to work on recording the full produciton version. Once done, I'll do a preliminary mix, then usually let it sit for a few days (or longer) to get fresh ears before re-mixing, then getting feedback on the mix.

At some point I decide the mix can't be tweaked any further, its as good as it gets - done!
2 years down the road I may listen to it again and think 'oh, I could have done ______ instead' or that I might have turned down the lead guitar in one part of another, but I don't go back to it if I had considered it finished.
On the other hand, there are songs which I had thought I had finished a year or two ago, but wasn't real happy with them - they didn't make the cut for either of my first 2 CDs. This past weekend, I just retracked two songs from scratch with some minor changes, based on recent feedback.
At some point you, the writer/player/singer, have to decide that 'the song is over'!