Mentalism practitioners- psychics, magicians, clairvoyants and the like- developed their seemingly magical skills by taking note of people's behavioral patterns and mirroring them.
Even then, not all of the mentalist abilities can be explained as just a trick- sometimes, there are no scientific reasons for events.