The old city center can be easily explored on foot.
To get between the upper and lower sections, take the Elevador Lacerda or the cable car, remember to take small change as the fare is just R$0.05.
The streets between the two are considered dangerous even during the day.
Getting around by bus:
City buses, as in other Brazilian cities, are constant and confusing. Fares are normally R$2.20 (R$2.15 for buses into the neighboring city of Lauro de Freitas). There is also the option of the air-conditioned executive buses for R$4. Remember to board in the back for the full-sized buses.
Know your landmarks and neighborhood names. Any large shopping area will have a complimentary frequented bus stop, and the major intercity terminal, Lapa, is next to Shopping Lapa.
Other major bus terminals include: Estação Iguatemi (between the Rodoviaria and Shopping Iguatemi), and Estação Mussurunga (located on the Paralela with buses usually connecting to Praia do Flamengo interior neighborhoods in Salvador).
If you are trying to make your way out of Pelourinho, you can either take the Elevador Lacerda down to the Comercio and find buses for just about every route, or walk to the Praca da Sé bus stop just south of the elevator, which has a much smaller selection of buses passing through, and many options of executive buses.
Buses are safe to ride at night, as long as you are on a frequented (i.e. coastal) route and dress/act inconspicuously. Service stops at midnight and begins again around 4:30-5AM. There are a limited number of lines that provide night service from midnight-4AM.
You can find more about about the Salvador bus routes and time tables one the website for the Superintendência de Transporte Público transalvador.salvador.ba.gov.br. But it's in Portuguese only. :(
Getting around by taxi:
Salvador cab drivers must be competing with those in Rio for spots on Formula 1 racing teams. They will certainly get you where you're going quicker than the bus! However, as buses stop running after midnight, do be prepared to haggle quite a bit with taxistas who refuse to use the meter, especially if you've decided to explore far from your bed.
Executive taxis (white and blue) don't have meters, and the prices are on a table, it's more expensive than city taxis, but they are much more comfortable, they are in stops in the main shopping malls, the airport, bus station, ferry-boat station and big hotels.