www.studybass.net is a good place to spend some time.
Learn your fretboard so you know where the notes are.

You will be playing chord tones (notes of the chord) If the song is in the key of C your chords will probably revolve around the C F and G chords. Find a C note on the A string of your fretboard - hint look at the A string 3rd fret. That should be your C note Where is the F? Where is the G? Yep it's going to be easy.
Playing chord tones - C scale is made of:
scale degree 1, 2, 3, 4, 5, 6, 7
Scale note....C, D, E, F, G, A, B
Playing Roots only over the C chord. C is your root. Play R-R-R-R or C-C-C-C.
Playing Root - 5 over the C chord. Play R-5, R-5, R-5, or C-G, C-G, C-G
Playing over the C chord a bass line of R-3-5-3 works well. That would be the C-E-G-E notes.
When the F chord enters the song that same R-3-5-3 will work again. Now that is the F-A-C-A notes.
When the G chord enters the song that same R-3-5-3 will work again. Now that is the G-B-D-B notes.
So.... makes since to put that R-3-5-3 to muscle memory. Get your head around that. Place the root and away you go.
OK helps to know where C's scale degree notes are on your fretboard -- hang on.....
C is your root or 1. Find it on the 3rd string.
Where is the 2 or D? Same string up two frets.
Where is the 3 or E? Up a string and back one fret.
Where is the 4 or F? Up a string same fret.
Where is the 5 or G? Up a string and over two frets. Or just below the root note one string down.
Where is the 6 or A? Up two strings and back one fret - right over the 3.
Where is the 7 or B? Up two strings and over one.
That same pattern repeats itself all over your fretboard. The 5th degree of any scale is - from the root up a string and over two frets. Likewise the 3rd degree is up a string and back one fret. Neat thing - if your root is on the 3rd string the 4 is right above the root on the same fret and the 5 is right below the root on the same fret or --- up a string and over two frets. Pay your money and take your choice. Put that to memory and your fretboard will not be a mystery.
Play with that - get to know your fretboard - find your R-3-5-3 on the I IV & V chords in the following scales. Should explain why I said I IV V and not 1 4 5. Chords are written using Roman numbers. Notes are written using Arabic numbers. Helps us know what we are reading. Chords or notes.
G scale's notes are G, A, B, C, D, E, F# The chords you will probably run into will be the I (G), IV (C) & V (D) chords.
D scale's notes are D, E, F#, G, A, B, C# The chords you will probably run into will be the D G & A chords.
A scale's notes are A, B, C#, D, E, F#, G# The chords you will probably run into will be the A D & E chords.
E scale's notes are E, F#, G#, A, B, C#, D# The chords you will probably run into will be the E A & B chords.
Find the Root, 3rd, and 5th degree of those scales on your fretboard. That and
www.studybass.net should give you a good start for your lessons. What I've given you can be studied with or with out a bass in your hands.
Have fun. Questions - just ask.