Photographing people is not much different from photographing wild-life. You can either go for the startle reaction, or you can get them used to you to the point that they ignore you. The latter takes more time and more involvement, but in the end that investment of time can be quite good in terms of images captured. It's a question of trust.
A photographer who is a member of a photoclub that I'm in, is well known for the amazing imagery that he comes back with from his travels. He explained that his way is to become part of the community (sometimes being there for days), until they accept him as being another member of the community, and then they start opening up and revealing a lot more of themselves than they otherwise would. He recently had an exhibition of some of the images he made in places like Afghanistan, India, Sri Lanka, Kenya, South Africa, where he was trusted to capture images and moments that no "outsider" would be able to see. As he pointed out to us, without that trust, he cannot, and will not take the images. He also only uses the images that the people allow him to use - he invariably does a show for them with the images he captures, and if anyone objects to an image being shown, he takes it down.