Playing along to records is a good way to learn once you've started to have a feel for the instrument.
For online instruction, people keep recommending
www.studybass.com and other similar sites. I haven't checked it out myself though. If you search on the topic, you'll find more tips on other sites.