It can also have a lot to do with nonverbal and body language–observe how close people stand to one another, how much eye contact if any, whether people greet strangers & if so how, how people queue, etc.. It took me a while when visiting India to learn that people don't stand on line the same as they do in the USA. I put my bag down in an airport line to get out a document, and as the line moved forward, people just started going around me, because I was not immediately moving forward with the line. In the USA this would be considered very rude, but in India (at least in my limited experience) it was considered typical–the line doesn't wait for you, move it or lose it. I got with the program quickly after I learned that.
And this should go without saying but don't display expensive or flashy things (jewelry, cameras, possibly fancy cell phone etc.) in an environment you're not familiar with.
I agree whole heartedly. I'd gone one further and add "become a regular". Get coffee/beer/food from the same place every day and consider enrolling in a language/art/something short course. It's amazing who you can meet over the course of a month or two - I met a bunch of interesting people including my wife.