Though there are a couple of bus routes to OB, getting there by car is really the most convenient way. Finding a parking space on Newport Avenue may take some time, as it is the most popular shopping section of OB. There are a few free parking lots, right at the beach, one at the pier, one near the lifeguard tower and one at Dog Beach.. During the summer months these lots are usually full for the whole day, so get there early to find a spot. During the off season months this is not such a problem, except on weekends and during special events.
Most of the motels/hotels in OB include free parking.
I have to drive everywhere because walking is a problem for me. However, OB is a "walking friendly" community and most things of interest are within a few blocks of each other. The beach is about a mile long, Newport Avenue is the main street and only a few blocks of it would be of interest to a visitor. Even if you stayed on Voltaire Street, a walk to the beach would be a couple of blocks and to Newport Avenue several more, but not too far.
Walking beyond this section might be a challange as the streets become hilly and more difficult.
I should mention that reaching the OB Pier from Newport requires a climb up the narrow stairs, but if you walk a block south to Niagra there is a ramp that connects the pier to the street. It's pretty nifty, especially if you are in a wheelchair or pushing a baby in the stroller.
There are no buses to get around Ocean Beach and really it's not needed in this compact community. However if you are coming into OB and have to rely on public transportation you can take MTS BUS route 35 from the Old Town Trolley (Transit) Station.
If you are coming from downtown San Diego, take the MTS BUS route 923 to get into OB.
The routes for both buses will take you down Cable Street through OB, which is about three blocks from the beach and it will pass Newport Avenue, the best stop if you want to see the main commercial section as well as get to the beach.
Conversely, if you are staying in OB and want to do a bit of sight seeing in San Diego, these routes will send you on your way.
There are no bike rentals at OB, that is mainly because there is no "boardwalk" along this beach. It may also be because much of the terrain is full of hills. However, if you have access to a bike and love a challenge, it would be worth riding around the beach section, which has been going through some changes and there are more places to ride.