Writing IS part of the learning process. Indeed, you can only learn composing by doing it. But the techniques and craftsmanship outside of the creative aspects need to be learned too. Sometimes this happens while doing a piece and sometimes not. More often than not, however, you will need external training from a book or six, and instruction from a teacher (if applicable).
The biggest thing you MUST know is music theory. Know it backwards and forwards and sideways. Orchestration is also essential, right along with harmony and counterpoint etc. Basically anything to do with music short of playing the instruments yourself! Indeed, it is daunting, but that's the life of a composer.
Alan Belkin's oft-quoted letter may be of interest to you: http://alanbelkinmusic.com/letter.html