To compose something is to create it from parts. In the context of music, the composer is the person who created the music. Usually composing music = writing music; but since the distinction is made it's exactly as Matt said.
Some extras:
'Compose' often used to describe music, but not always. You can say 'compose' when you're talking about writing something (as long as you're not just writing randomly), but it's not often used. For example, you can compose an article or a sentence. It's not often used to refer to something that's not written.
Here are some variations:
Something's composition is what it's made from. For example, I can say that "concrete is a composition of calcium, silica, aluminium and iron", "concrete is composed from calcium, silica, aluminium and iron" or "the components of concrete are calcium, silica, aluminium and iron". All three have the exact same meaning.
To 'decompose' refers to the rotting of dead animals. It does not take an object.
To 'compose yourself' or to 'regain your composition' is to control yourself and make yourself calm, usually after some kind of emotional outburst.