It depends on what kind of music I'm making. If it's for my band which is industrial stuff it happens a number of ways. Sometimes we'll sit down and have a feel we're going for. One song we wanted something that had a sort of dance feel to it like some of KMFDM's stuff from the symbols album (megalomanical for example) so I laid out a beat that had a real... dance feel to it and then came up with some melodies that went with it that were catchy and remniscent of electronica you'd dance to but had the edgy industrial feel, then enters guitar. Voila. Other times we'll fiddle around with melodies and rhythms on guitar and find one we like and write it down. Then we'll work and build around that. Add the noise, synths, beats, samples, etc. Sometimes one of us will just get stuck and give up on it and pass it to another member of the band andj ust say "work with this." Other times we'll just sit down and go back and forth with the writing. With our music our overall sound is more or less influenced by artists like KMFDM, PIG, NIN, Skinny Puppy, OhGr, Funker Vogt, Schwein, Buck Tick, Puscifer, APC, etc. We also have varying personal influences which kind of bleed into the overall sound. The other guitarist and I write all the music and we each kind of have our own different way of writing.
With one of the purely digital songs I did with Reason I had a specific sound in mind that was a sort of upbeat poppy instrumental that created this kind of light imagery. So I once again started with a beat to sort of have a foundation to work with and took from there and kept adding stuff and deleting stuff until I was satisfied with what I ended up with.
For anything else my personal sound comes from a whole mess of different influences simply because I listen to so much music. I'm really all over the place and my taste is eclectic so I write all kinds of music. Damon Albarn is a pretty big influence of mine, if not at least an inspiration simply because of the different kinds of music he's made with Blur, The Good The Bad And The Queen, and specifically Gorillaz. The latter is a huge influence because of the mashup of different genres of music including hip hop, punk, pop, electronica, dub and reggae.