When playing a written melody, you’ll have your key. (All you need to do is remember it.)
A written melody with chords on top is called a lead sheet. This is what we’ll use to practice this skill.
Learn the melody by itself in the right hand only.
Run through the chords and make sure you know how to play them all.
Play the melody in right hand and the chords in the left hand.
Play the melody in the right hand with the chords. Play the melody as the top note of the chord. This means adjusting the chord so that the notes from the chord are played below the melody line.
Note: you don’t need to play the chord all of the time or even play all of the melody notes. Just do what works and sounds good.
Play the bass line (root notes of the chords) in the left hand, the chords and melody in the right hand.
Once you have this at a basic level and it’s working, you can start to add in things like rhythm, left hand patterns and any fill-ins you think will work.
If you have lead sheets of your own, feel free to use those also.