It depends on the type of music...
If it's boring old rock or whatever, I usually start by jamming out some chord progression on my guitar, and then building a melody around that. Or sometimes (but rarely) I'll go the other way, and start with the melody, and find something interesting that goes with it. Then I sit down at the computer and come up with a beat and a bass line, and yeah, it just kind of happens at that point.
If it's more of a pop song, I usually start with the beat. Usually in Reason or something, I dunno. And then I just kind of mess around and build around it until I find something I like.
If I'm doing something symphonic, I almost always sit at a keyboard and find a melody to build on. I'll take that melody and toss it around from one instrument to the next, making small changes to tempo, or trying things like repeating the melody but over a new chord or chord progression, so I have to alter the melody slightly so it fits. Or I'll try harmonizing, or splicing or layering them so they intersect and interact with each other.
Other times I again go for the whole chord thing, but since symphonic work isn't about verses and choruses it's more about modulating from different keys, or seeing how far away from the current chord I can get while still keeping one or two notes from the previous chord.
From there, it's just filler, really. Short melodic fragments get thrown in, rhythmic ideas work nice to give the piece drive, etc...
Again, at this point, it just kind of happens.
Though I often take cues from other composers, like Beethoven or Debussy, or even specific genres, like Gregorian Chant or Opera.
I don't do much ambient or texture work, but when I do I try to remember what I learned studying under this one teacher I had a year ago. He told me about building textural complexity from beginning to middle, and then leveling off at the end. So, I try to keep in mind what frequency range the sounds I'm using are in, and how complex the underlying texture is, and just kind of mess around and start recording until I get something I like.
Yeah.
lol