As far as musical instruments go, the electric bass guitar is a very new instrument, having first appeared in the 1930s. The stand-up double bass, commonly seen in the jazz and swing music scenes and more akin to an over-sized cello played without a bow than to a modern electric bass guitar, will be omitted from this writeup as my experience, listening history and knowledge covers only its modern descendants.
The first electric bass guitar was created by musician/inventor Paul Tutmarc in the mid-1930s, and was manufactured by Tutmarc's instrument company, Audiovox, which is still around today, although today they mostly concentrate on consumer electronics like car stereos that are generally regarded as cheap or low-end. Though the electric bass was used in jazz and other pre-rock and roll musical styles, its primary renown comes from its use in rock and roll.
The modern electric bass guitar comes in a few varieties: 4-string, 5-string and 6-string, each offering expanded scales as the strings grow in number. Basses are also available in fretless models, which produce an extremely slick sound and are generally used by virtuosos. By far the most common type is the 4-string bass, played by a majority of bass guitarists in all rock-derived music, as well as country/bluegrass, folk, Motown, funk/soul, R&B, ska, polka (no, really) and occasionally even hip-hop. Basses with more than six strings appear in a variety of genres, with the most common appearing to be the 12-string bass.
The bass guitar is almost always used as a backing instrument, in tandem with drums, to provide the "low end" of the song structure and to complement the timing maintained by the drummer. Rarely, though, you can find music with "lead bass" instead of lead guitar. Two great examples I can think of are Les Claypool of Primus and Peter Hook of Joy Division/New Order and as a part of his solo works. Claypool works exclusively with a 6-string bass for greater range, while Hook alternates between a 4-string and a 6-string, depending on the song being performed.
The components of the modern electric bass guitar include much of the same inner workings as a standard 6-string electric guitar. The bass also uses pickups (standard, split-coil and humbucker), tone and volume controls, and, like a standard guitar, needs a battery to keep these components alive in some models, depending on manufacturer and price, with the more expensive ones drawing the needed electricity from the amplifier via the audio cable or via the battery-powered wireless amp transmitter. Other differences include the thickness of the strings—bass strings are much thicker than standard guitar strings, to achieve that deep bass sound that sadly is often (but not always) mixed down during production to nearly inaudible levels. Another change is the size of the bass guitar: the neck is much longer than a standard guitar, to accommodate the wider frets. The body is often heavier and the headstock and tuning pegs larger. Most basses are solid-body but hollow-body models are available, usually by custom order or in an acoustic/electric bass guitar. More or less every single manufacturer of electric guitars also produce electric basses. Common names include Gibson, Ibanez, Fender, Jackson, Rickenbacker and Epiphone.
The bass is also played differently. Chords are used sparingly, unless in a lead bass setup, and playing strings open (that is, unfretted) is more common in bass-playing than in standard guitar-playing. The high end of the bass range, on the thinner strings and closer to the body, is rarely used, except for, again, in lead bass settings. Some players play the bass with only their fingers to manipulate the strings—this is commonly known as "slap bass" playing—while others use a plectrum and others still are adept at playing in either style, according to the sound and feel of the song being played. Palm-muting is also a very common technique; it's much more common than in standard guitar-playing. Like the standard guitar, however, the bass uses the same fret positions for playing harmonic notes.
Unlike the EADGBE tuning for non-bass guitars, a 4-string bass uses the EADG tuning but CGDA is also commonly used for a higher-pitched sound. 5-string basses tend towards the use of EADGC and CEADG, while 6-string basses use a wide variety of tunings. Basses with more than six strings are available but are very uncommon and are almost always custom-made for professional musicians. Such models are known as extended-range bass guitars, or ERBs. They first appeared on the virtuoso scene in the mid-1980s, where they have largely remained.
Bass guitars can be used with a wide variety of effects pedals and, indeed, many pedal makers have product lines dedicated especially for the bass market. Seemingly as a rule, however, bass guitar almost never uses distortion of any kind because it makes the bass line even harder to hear amid the guitars, which almost always use distortion, with the one exception being the "fuzz bass" style of playing, frequently heard in jazz music. Pedals intended to achieve this effect are often dubbed "fuzz boxes" rather than "distortion" pedals even though they produce a very similar sound. Common effects pedals for rock music include pre-amplification, delay, overdrive, sound compressors and occasionally wah-wah pedals, which are most frequently associated with lead guitar rather than bass.
Here are a few famous names associated with the bass guitar:
Now for my story: I played bass in my teens and early twenties, but ended up stopping after my bass was stolen in 1998. Some years later, I bought a new bass, but I was so out of practice that I ended up pawning it after a year or two. I've always considered my hands to be too small to play bass competently and, since I couldn't read sheet music, I had to rely on tablature, which tells a musician little about timing or note duration. What few songs I could play, I learned by rote, listening to them repeatedly and following along with the tablature (if it was available) to determine the timings. The first song I learned to play has a wonderful bass line that carries the whole song: "Sunshine of Your Love" by Cream. I also learned a couple of jazz lines, as I volunteered my services as a bassist to my high school jazz band—I was the only bassist to attend my tiny high school—but I don't remember their titles other than the jazz standard "Killer Joe". I recall Black Sabbath songs being fun to play, since Geezer Butler was such a wizard on the instrument, and the songs were fairly slow by heavy metal standards. I made many attempts to learn early Metallica songs (from the pre-Jason Newsted era), but Cliff Burton was an extraordinarily advanced player and I had no chance of ever becoming as good a player as he was—I mean, he was the first heavy metal bassist to have a song-length bass solo put on an album. It's called "Anesthesia (Pulling Teeth)". If you haven't heard it, check it out, and wonder at its extreme complexity. It's likely the most important and impressive electric bass guitar composition, using the full range of the instrument, ever put on a rock album. It appearing on Metallica's 1983 debut album "Kill 'Em All" and was played live, with variations, at almost every Metallica concert prior to Burton's death in 1986.
In conclusion, the bass guitar is one of the three foundation instruments of rock music, along with the standard 6-string electric guitar and the drums. Nevertheless, there's an old saying, dating back to the birth of heavy metal, that states "Nobody listens to the bassist". While most people probably don't, those who do enjoy a deeper appreciation of music and how it's made. Without the bass, we'd probably all be listening to classical or flamenco, since there'd be no real rock and roll without it. I urge any and all to pay rapt attention to the bassist. You can learn a lot about music by digging deeper into all your favorite songs, if you want to. And I don't know about you, but to me, lacking the knowledge of how music is composed, played and produced, listening to music is a lot less interesting.