People wrote music all different ways, there was a composer who wrote an entire symphony based on the mountain ranges around him, Mozart rolled dice, and another fellow used I-ching coins. Writing music isn't too hard, for the counterpoint and harmony, but the melody is the hardest part which you will need.
And try not to listen to music as your composing. Start small with some simple waltzes, canons, then when that is mastered move onto minuets, vienese waltzes, and sonatas. Then from there concertoes, and quartets. Once you have mastered these try your hand at a couple symphonies, first for string orchestra then for a full orchestra. You have to master each one before you can move on. And try to get either a piano, keyboard, or a softwere program (sibelius preferably).
I once learned the music theory