Good pool with gym? In the city proper, that limits you to downtown areas, and not many good pools at that.
Oakland and Berkeley (and some suburban towns) have YMCAs with pools. If you want to explore all of the "bay area," and not just the city itself, you probably want access to an automobile. You can get anywhere in the city by pubic transit (if you have a lot of time) but the USA is not known for good public transit. In the burbs, reasonable public transit is pretty much limited to routes commuting into and out of the city. There are 2 "car-share" services in the city, but you should first thoroughly check out their details before relying on them as a source of rental cars - as a non-citizen, it is possible you might not qualify . You might need a California Drivers license (which foreigners living here can obtain - but it might take a month to get the plastic license that rental car companies require.)
Contrary to what Paul said, BART is fairly reliable - most "breakdowns" only delay things for a half hour or so. But it only goes where it does, and if you don't live near a station and have a destination close to a station, it is not all that useful (though one can take a bike on BART).