I live on the opposite side of the country, but from what I can tell, there are definitely locomotives operating in and around San Francisco. Caltrain operates passenger trains there. Union Pacific Railroad operates freight trains there. A quick Google search also found references to shortline railroads in or near San Francisco, called LB Railco and San Francisco Bay Railroad. All of the above utilize diesel-electric locomotives.
In the case of freight trains, there are typically two people in the cab of the lead locomotive. What I mean by "lead locomotive" is the locomotive at the front of the train; there may be multiple locomotives, but in the case of diesel-electric or electric locomotives, all of them can be controlled from the lead locomotive, rendering it unnecessary for there to be personnel in each locomotive. (Sometimes there are "pusher" locomotives at the other end of the train, and those may require another engineer and another conductor, but I don't think that's germane to your question.)
The person who controls the locomotive(s) is the engineer. He or she is the one who "drives" the train. (In some parts of the world, they are known as train drivers).
The second employee in the locomotive is usually referred to as the conductor, but may also be referred to as the brakeman, fireman, or trainman.
Note that in the case of passenger trains, there is often only one person in the locomotive (the engineer). The conductors and assistant conductors are in the passenger coaches. Some long-distance passenger trains may have a second engineer in the locomotive, to relieve the first engineer of duty after a certain period of time.
The engineer is the one who controls the physical movement of the train; therefore if there is a automobile or object blocking the tracks, it is up to the engineer to determine the best course of action, whether that means blowing the horn, slowing down, bringing the train to a stop, or all three.
If an automobile is stopped on the tracks and shows no sign of moving out of the way, the engineer will apply the brakes and bring the train to a stop as quickly as possible. In industry terminology, this is referred to as putting the train into emergency. Due to the laws of physics, this doesn't necessarily mean that the train will not hit the automobile. Trains are very heavy and cannot slow down as quickly as an automobile can.
I hope this answers some of your questions. If you have more questions or need more information, feel free to ask. We have a number of railroad employees who are members of this site and they are a wealth of information and knowledge. I'm not a railroad employee, but I've been following the railroad industry for many years. If I've gotten any of the above information incorrect, I'm sure the pros will correct me (and I appreciate it)!