The melody is basically the tune of the song. For example, when u play "Mary Had A Little Lamb" using one finger, that's melody. It will usually be the highest notes being sung or played.
The bass is the drive of the song and the foundation for the chords. It will be the lowest notes u hear being played or sung. You ever hear a song where there is a breakdown and the only thing u hear are some low notes being played accompanied by some type of drum pattern? That's the bass line being played.
The bass can stand alone during the song, but the melody can't. This is why I stress the importance of learning a song by the bass first instead of the melody. Without the bass, ur song and/or chords have no direction.