Well, it's both easy and hard. That's because it's a cumulative process to learn what you need to know. You gotta know the progression (what chords are there AND how they relate to each other), the individual chords (what notes are in them AND where those notes are on the neck), the melody (unless you're just vamping on the progression, the melody guides the bass line) and how to make it happen both harmonically and rhythmically. That's a lot to digest.
So, take a simple progression. Let's use a standard |ii|V|I| in C so that's a measure of Dmin7 to G7 to C major.
A. What are the chords (OK, I gave you those, but you gotta know how they relate, which is a bit more than just knowing THAT they're ii V and I, but what that really means. So, you gotta know the harmonized scale. Learn that, don't just memorize that I and IV are major, ii, ii, and vi are minor, V is dominant7 and vii is minor 7 b5. You gotta understand exactly WHY that happens.
B. Then you gotta be able to figure out (again, don't memorize this crap- you have to OWN it which means you need to be able to think in your head without any instrument what notes are in the chords) what notes are in those chords. That means you need to be able to determine for yourself that the notes here are D F A C, G B D F, and C E G.
C. Then you gotta be able to find those notes all over the neck, not always starting on the root. That means you need to be able to FIND for yourself (again, not using any charts or diagrams) where every D F A C, G B D F, and C E G is. That means if you're using a standard tuned 4 string, you can start on the low F and play the Dmin7 arpeggio from there up to the highest note of the chord on your bass, and back down. Then start on the F again, and play the G7 arpeggio up and down, crossing strings, finding every permutation and the same for the C chord.
D. Then at a slow tempo start playing the arpeggio of the Dmin7 for four beats. At whatever note those four beats end at, go to the closest note of the G7 (not necessarily the root) of the G7, play through that for four beats, then move to the C, then back to the Dmin7, etc. That gets your fingers and ears working together with your brain to know where the notes are and you'll see the connections. At this point it won't sound much like music, but it's teaching you where the notes are.
E. Now, put your bass down and don't touch it. Listen to a recording of the progression (or play it on a guitar or keyboard if you can) and SING a bass line that sounds good to you. Record what you sang, then learn it EXACTLY like you sang it. Don't try to "fix" it so it sounds better, or so it's easier to play. You want to avoid that because you want to get to what your ear tells you sounds good, not what your fingers tell you should sound right.
Repeat over and over again with all sorts of different progressions.
John