Seems like I am late to this discussion. Unlike the greybackshadow or cheez, I am not a real arranger. I have programmed 1 or 2 songs before on midi, and I know what I want it to sound like, but that's basically it. All my "arrangements" are basically imaginary. I will not be able to talk about the nitty gritty like those two, but I believe I have a precise enough idea of what I want.
A lot of the time, composition and arrangement are separate. But sometimes they are not. That usually happens when a song is not much of a song but rather a lot of hooks piled up upon each other. And that's when the line is blurred. In some forms, like soul music, the melody and the arrangement is blended together, hard to tell when one begins and the other ends. Like Michael Jackson's "Billie Jean". There are about 4 or 5 hooks. (drums / bass / keyboards / violin figure / guitar figure / conga shaker) and they are all interlocked, fitting together like a jigsaw puzzle. The melody is not that interesting, the chords are not that interesting, the real song is in those 4 or 5 hooks.
If you listen to what Stevie Wonder was coming up with in the 70s, you should remind yourself that he's blind, younger than 25, and playing most of the instruments himself - drums, bass, keyboards. Without the aid of sight, without the aid of MIDI. Most songs, I can listen and play out what are the individual parts. I haven't been able to do that with "Superstition". I heard that there are up to 9 keyboards in there. It doesn't seem stiff, but it's light and bouncy. So I also consider Stevie a master arranger.
So this sort of thing usually happens in soul music where the melody / chord sequence takes a back seat, and texture / rhythm takes a more prominent role. It also turns up in the music of Can and more recently Verve's "Bitter Sweet Symphony" which is basically the same thing repeated over and over for 5 minutes but it still sounds great because every time it's played different.
You can learn a lot about soul music because some of the greatest arrangements are in soul music. I was listening to "More Than a Woman" by the Bee Gees the other day. I know that a lot of people look down on disco but there is a lot going on in there. I would love to produce something like that one day but they are operating on a very high level. Everything is in there - rhythm section, strings, rhodes piano. How does the Rhodes piano play minimally, decorate the sound, but at the same time not draw too much attention to itself? And notice that at different parts of a song - particularly those recorded in a studio, the balance between the instruments change abruptly. Some parts that were soft are suddenly mixed up, and others mixed down.
Brian Wilson of the Beach Boys is known as a great arranger due to his work on "Pet Sounds". But there is another guy who is very subtle. He is Brian Eno, who produced for Talking Heads / David Bowie / U2 / Coldplay. You can listen to his own ambient music albums, which were made for the purpose of "background music which is always interesting but should never stand out". Which is ironic because he was basically kicked out of Roxy music for sticking out too much.
I never write music in front of an instrument. Anything I write, I know what it sounds like. Then again, a lot of the times, you can come up with a melody in one context, it doesn't make sense. But when you switch context, it fits. In a way, there's no need to think too much about arrangements, because arrangements are like recipes. You know what the major recipes are: there is the Rolling Stones sound, the U2 sound, the Pavement sound, the Smiths sound. Just take a recipe, the one that fits, and then recreate that sound. If you write a song, you can ask yourself, is this a Rolling Stone / U2 / Pavement / etc song?
Most of the arrangement is done in the head, because you need to imagine how everything is going to fit together. There is no use you having one piece here that sounds nice, another piece that sounds nice, and when you put them together, they clash, and you didn't figure that out because you can't imagine what the instruments sound like.
Having a good pair of ears is a prerequisite for arrangements, unfortunately. There is no substitute for listening to something and knowing exactly what to fix.
There is one rock solid rule for arrangement I want to point out: if you are repeating a section of music, never use the same arrangement the second time around. You will be wasting an opportunity to make it sound more interesting. One common trick, the drum part gets more and more complicated 2nd, 3rd, 4th time. It will be subtle and not everbody will notice, but it is vital.
One interesting aspect of arrangement is writing the guitar solo. It has to be treated with care, since the guitar solo is often the climax of the song. This is when the arrangements are the most intricate, most complex. It's like football when the ball is played into the path of the striker - whether it is a goal or not depends on whether you get it right. I've had experience where the song takes 5 minutes to write, but I take hours figuring out the guitar solo.