We loved checking out the (free!) Cable Car Museum a few days after our arrival in SF. It was a great introduction to what is, in my opinion (and certainly that of my children), the most fun form of public transportation in the city. Throughout our time there, and still when we drive back up, the kids were obsessed with seeing the cable cars and waving to the folks on board.
I loved that the museum gave some background on how and why the cable cars started (horses were having trouble going up the super steep SF hills), how they were almost eliminated (due to newer forms of public transport, such as buses), and how they were saved (by a women's group that petitioned to keep them as a historical relic of San Francisco).
We also really enjoyed learning how the cable cars actually work. Whenever we rode one after that, both of the older kids loved talking about the gripper and how it would pull the cable car along the cable beneath the street surface, and enjoyed watching the conductor start and stop the car and remembering how that happened. They also loved to play "cable car" whenever we walked through the city after that - this involved them walking along the sidewalk cracks and grabbing onto their "grippers" to start and stop and go faster/slower. Fun times!
Plus, what kid is going to complain about seeing lots of fun underground cables (the hub for all the lines in the city) and old cable cars? Not mine, that's for sure.