When I sit down to write, I usually just have one small idea in mind. For music, it may be a chord, a harmonic progression, or a theme of a melody. For fiction, it may be a line of dialogue, a particular incident that happens to a character or that may have happened to me, or an idea for the climax of a story.
After I am inspired by that initial idea, my writing process turns over to the craft of composition that I have refined after writing many stories and songs. For a song, I like to have solid structure, such as A-B-A-C, or A-A-B-A. I take the idea and make it fit logically into this structure. For fiction, I develop an outline of the story I want to write around my idea, adding necessary exposition and development to surround the idea and make the story have meat to it.
Of course there are many facets to this writing craft, which I have honed through much practice and knowledge of theory. Like with any artist’s craft, I draw on the large network of knowledge I have developed, using everything I know as tools in the creative process. Likewise, I draw on my experience in one field as a tool to improve the other—when I am writing fiction, I remain aware of the musical shape of the prose. When I write music, I think of the grammatical language of thematic phrases, and sometimes I write lyrics that explicitly give words to my music.
In all events, I find the practice of composing to flow naturally from a seed idea to the writing craft to enjoyment of a finished product, which I often find other people enjoy more due to my experience in each phrase of this process.