I noted the sign on the bikes - BICING - and googled it and learned what it's about. It is a community bicycle program in Barcelona (like the zipcar or share a car program in many world cities). Paris has a similar bike program as well. Bike "stations" are conveniently located near a metro station.
How to participate in this program? Sign up for a yearly membership. For more info, here's the website . If you don't have a translator, the wiki page is very helpful.
I applaud programs like this. I wish other cities will adopt this program (I don't know much about logistics in launching projects like this). I don't know if this venture is applicable to the city of San Franciso (too hilly), but I'm sure other cities can surely benefit from it.