I am trying to learn a song and it has like a steady beat for the left hand and I cant quite keeps that beat while playing the melody.
Use a metronome. If you don't own one there are apps for most smartphones and probably even websites that will work. Practice however slowly you need to in order to play evenly then once that speed is mastered try incrementally faster. I generally keep doing this until I can play it faster than it is meant to be played so when I play it at normal speed it is easy.
Try to imagine that the left hand beat is like a conductor keeping time, while the melody is being played. All of a sudden your brain will click into the rhythm and it will come naturally. Whatever you do, don't practice the two hands separately too much but make sure your right hand DOES have the melody down pat.
I don't play piano, but I play guitar. You just have to keep practicing until you get it. It takes time. Think of each hand seperatley like any other multi-tasking situation.
Practice make perfect:)