Regardless of your motivations, that can go from a wide range of catalysts that cause this passion and impetus to be able to create something out of thin air, there are stages in the learning process that we should be aware to avoid any kind of situations that can be translated into disappointments or frustrations that can result into a hindrance in your path.
Along many years of teaching, I observed certain characteristics that people who aspire to become music composers have:
Curiosity, creativity, imagination and overall, discipline. All these aspects contribute to a developing artist, but the last one is definitively helpful at the beginning of their studies, as it is paramount for the aspiring composer to grasp the amount of hard work it takes to learn the craft of composing.
Creativity and imagination can be developed, and all serve to a common goal: how to express yourself in a way that others understand using music as a medium of manifestation.
Lastly...curiosity. If you show the interest of how music works, to see beyond what is heard, or written on a music sheet, you are most probably on the right path.
Now, let's focus on the steps to be followed to build a solid foundation on which we will develop the characteristics aforementioned.
The early skills to be approached are Music theory, which can be seen as the "Grammar" of the music. As you study the alphabet and the rules of a language, in musical language works the same way. There are certain "codes" which can be understood as "common practice".
The use of melody, rhythm, harmony, counterpoint, orchestration and texture demonstrates the composer’s awareness of elements of extension, development, variation and contrast in creating a formal structure. This is related to the concept of "Syntax" within music knowledge. Once the foundation is built, the task of the composer is to "put together" all the elements that contribute to the creation of a musical piece. Actually, the word "composer" comes from Latin compōnō; literally "one who puts together".
Another important aspect of your musical growth is the developing of your aural competency. This will allow a more fluent communication of the ideas spurring from your mind to the paper!
Additionally, you may want to learn how to play instruments. You should focus mainly on the piano, which can be said, is the main "composer's tool" so that they can use instrumental aids when composing music.