Well, I would start learning harmony. Soyar´s advice is excellent. By harmonizing simple, short known pieces, you will get the hang of it. At the same time, I recommend you to learn the theory, in order to understand why things work or do not work
I also suggest that you should invest in a keyboard, and hook it up to a computer with a notation program (e.g.Musescore). This setup could be the easiest way for a practical study of harmony using different chords. You can store, compare and playback your work any time. Moreover, you can always see the score of your work. It is important to obtain a skill in notation and reading scores.
At the same time, you can start writing (play) some VERY simple, short melodies. Then, continue with harmonizing your melody. Start with chords, and when you are satisfied, you can go for variations (for example make arpeggio´s of the chords, add a bassline etc. This is the way I started.
In principle, you can do all this by yourself. There are on-line courses in composition, but mostly, I find them of limited value. Instead, I would recommend you to find a teacher.