I would listen to a lot of songs and get inspired by the sound to produce your own stuff in that process. There is also a lot of tips on chord progressions on the internet.
This
Link I saw one time is a technical approach to how rolling in the deep was put together.
There is also a plethora of knowledge on Youtube about structure of the song and rhythm and rhyme rules.
The melodies you kind of just have to hum in your head until you find something and after one melody gets old you can try to mix it up a little. Push yourself to think outside the box, sometimes that means trying new things, looking at the world around you, etc.
Hope this is a start, I am not the best either...