Start off by emulating songs you like that inspire you and fit your style, as well as songs on the radio... By doing that, you can get a feel for some common melodies heard in different songs. This can just give you a feel for creating melodies, then you should be able to translate that into your own creative process in developing melodies. I'm not saying go to a Timbaland song and copy the melody...just emulate what some of the popular songwriters and composers are doing, and you will start to pick up your own style of creating melodies