I heard that San Franciscans hate nicknames like "San Fran" or "Frisco". If I want to travel around San Francisco without sounding like a rube, what should I call it?
Most locals just call it the City, when it's clear from context that you are talking about the local area. You could say: "I'm staying at a nice hotel in the City". This will be understood to mean "within the San Francisco city limits." (Incidentally, this is a smaller region than most outsiders might guess). In writing, capitalization is optional.
Otherwise, simply call it "San Francisco". There isn't a shorter nickname in common use. It is a lot of syllables; locals tend to say it fast and slur a bit, something like "Sanfruh sisko".
Spanish speakers should note that, as with most Spanish place-names in California, most English-speaking locals use a semi-anglicized pronunciation. "San" is rhymed with "ban", "man", "tan". "Francisco" sounds like the English name "Francis" plus "ko", but the accent is still on "cis". The vowel in "Fran" is either the same vowel as "San", or else an unstressed "schwa" vowel.
"SF" is acceptable in writing (especially headlines, text messages, etc), but not so common in conversation. "SFO" refers to the airport but not the city. I personally have never heard or seen "SFX".
"San Fran" and "Frisco" are deprecated and will tend to mark you as an outsider. Locals tend to find "Frisco" particularly annoying. This goes back at least 140 years.
(I think there's a convention that people who work in the airline industry are "allowed" to say "SanFran". So the agent at the airport ticket counter might tell you "Your bags are checked through to SanFran", but don't take that as an indication of general practice.)
If you want to refer to the greater metropolitan area (including Oakland, San Jose, etc), and not just the city proper, it's "the Bay Area".
This is further subdivided into "North Bay" (north of the Bay itself, e.g. Marin, Sonoma, Napa and Solano Counties), "East Bay" (Oakland, Berkeley, and the rest of Alameda and Contra Costa Counties), and "South Bay" (San Jose and its immediate suburbs). There is no "West Bay". The ill-defined region between San Francisco and the South Bay (including South San Francisco, San Bruno, etc) is "the Peninsula".
As a side note, I don't think locals use the term "Silicon Valley" much; they're more likely to refer to specific cities like Palo Alto, Santa Clara, etc.
(Source: born and raised in the North Bay, and visit frequently. If there are emerging trends that differ from this, suggestions are welcome!)
I was born and raised in the San Francisco Bay Area and usually people just refer to San Francisco as San Francisco. I lived in the East Bay Area, and someone would say something like Let's go get dinner in the City and this would mean that you are going to San Francisco. However, I feel that it would be better to say San Francisco when you are in San Francisco as saying the City, at least in my perception of it, is referring to San Francisco when elsewhere in the Bay Area.