You want to write music? Awesome! For me, I have learned a lot about writing classical music by use of the internet, but even more so, by listening to the works by the great composers. Go to the store, or amazon.com, search classical music and find some that you like. Here is a great site for discovering great music.
http://w3.rz-berlin.mpg.de/cmp/classmus.html
It provides short clips from different pieces of music, giving you a small idea of whether or not you would like to purchase it. It is much like flipping through pages of a book before checking it out of the local library. And here is a site with links to sites for downloading free music.
http://www.classiccat.net/
Another site with free music downloads.
http://www.peabody.jhu.edu/584
Now after purchasing or downloading some great pieces that you like, you should purchase the full score for that piece off the internet. I bought a couple of score for Mahler Symphonies 5 & 6, and had an awesome time of following along with my recordings, lots of fun! This will give you an insight on the composer's style of writing, and many different ideas of melodies and harmonies. And then, as stated above by
IAmKing, you should look for a teacher and study things such as counterpoint and musical structure. Also, if you do not currently play an instrument you should consider that as well, because playing music can be a great way to learn how to write music, as well as learning notes, scales, etc. These steps should help you on your journey of becoming a composer. Hope this helps!