Generally speaking, the role of bass in most music is to add depth to the harmonic content and provide a connection between drums and pitched instruments. There are a very, very large variety of ways to approach the bass, so if you're interested in becoming a bass player, as opposed to just playing the bass, then you will need to spend a good amount of time looking into the different styles and approaches for all of the genres that you are interested in playing.
One thing that is usually lost on a lot of guitar players is the feel needed when playing bass (as I mention above the difference between playing bass and being a bass player). Bass is often thought to be easy by guitar players because it's like the same instrument but you only have to play one note at a time but that leaves out the nuance. Tone is very important and a good bass player will not only know how to dial in all the knobs but how to attack the strings for the sound they need. For instance, Jaco gets some of his tone from play close to the bridge, which will have a thinner tone and tighter sound. Playing closer to the neck will give you a warmer, more rounded tone. Getting in touch with this really helps. As a bass player myself, I am just as often thinking about the tone when writing as I am the actual notes. I've experienced really liking a part when played near the neck and thinking it was awful when played over the pickups or near the bridge (and vice versa). The tone can completely change how the bass line is functioning or experienced.
The most basic approach is to play the root note of a given chord. Different genres or songs within genres will call for a different approach for rhythms. You can play big whole notes (or one note per chord), or consistent 1/4s, 1/8s, etc. Once you start to explore syncopation, you will find a variety of ways to handle this as well. You can follow the guitar/keyboard rhythms, follow the vocal rhythms, follow the drum beat, or have a rhythm of your own within the song to act against the other instruments.
For note choices, it's good to remember the basic function of the bass: to connect rhythm and harmony. Many chord progressions (if not most) will have chords whose bass notes are not very close together interval-wise. Many players will choose to find notes to connect bass notes that are not intervalically close to smooth out the motion from chord to chord. One example of this is a "walking bass line", which consists mostly of small intervals (seconds and thirds) moving at a consistent pace, usually 1/4 notes. This is the standard Jazz approach to bass but is also used in lots of other genres at different times, perhaps most commonly in Blues.
You will also find that 'root-5' bass lines are very common, with country and bluegrass probably being the most common place to find them in more modern music. The root and 5th of a chord are the most 'solid' sounding chord tones and can be played fairly consonantly for just about any chord/chord progression. Clearly this is a different approach than the small intervals found in a walking bass line, however, you will find that a similar effect of smoothing out the feeling of distance between notes will apply when moving from chord to chord.
From there you can get creative, as long as your band mates allow it... A lot of modern (pretty much 60s and beyond) bass lines are essentially a part of their own and help define the song itself, not just supporting the other instruments. This is very common in Fusion and Funk, as well as some approaches to Rock, Soul and RnB. It can really happen in any genre though, like "Kind of Blue" with the bass taking the melody.
If you're interested in checking out the full extent of bass possibilities, I would recommend Jaco Pastorius, Stanley Clarke, Victor Wooten, and Les Claypool (and there are a lot more). Les Claypool is an interesting example due to his unique approach. He functions as the main instrument in many of his songs, often fulfilling both the bass and harmony roles, but has his own style that is very aggressive, dissonant and unique. It is also very interesting to listen to his compositions and notice when he is playing more standard bass lines and how he brings his unique flavor to those standard lines.
Hopefully this gets you off to a good start! Happy Bass Tickling!!!