As I'm sure you've figured out, it really depends on the person. Personally, I have an idea in my head and then that idea of what my song is about helps me to compose the music. For instance, if I want to write a song about stars, I know I want some kind of “twinkling” melody, maybe in the piano accompaniment. And then once I have all four parts chunked out, I come up with words.
Alternatively, It can be helpful to find a poem and set music to those words. I've done this before as well, and it's helpful for the side of my brain that can only think of the music vs the words. Either way, it all depends.