Like above, playing with other musicians is the best thing you can do.
Spend time learning each note by ear & singing them in your head so when you're listening to something, you know what notes are being played & what scale it is in. This will really only come with time & practice (obviously).
Walking basslines tend to be using the scale of the song & following the chords (in it's simplest form). 12 bar blues is a good place to get your basics for this.
Experience will come in time & before you know it, you'll be giving most of us advice (hopefully).
Anyway, you're headed in the right direction, keep it up!