Mirroring is a technique whereby you mimic someone's actions to make them like you. It's a tactic that is used in many walks of life – you see politicians mirroring their constituents to get more votes, or sales people mirroring prospects in the hope of meeting their sales targets.
The idea is that we are attracted to people who seem to be like us and think like us.
It's very simple - when someone adopts a relaxed posture you do the same. When someone sits cross-legged you do the same. When someone is smiling you follow suit. Very simple, but if executed wrongly it can be misconstrued as mocking. The secret is subtlety. Don't overdo the mimicking and don't copy their movements as soon as they move. Slowly ease into similar positions and never copy any body language that gives off negative vibes.