As robots are believed to soon populate human environments, they have received enthusiastic support in the scientific community. Most research aims at designing robots for assisting humans in daily lives, healthcare, or elderly care. However, there is also a less explored way of using robots – robots as tools to understand human cognition. In my lab, we take this approach, examining human cognitive mechanisms in social interaction. In this talk, I will present the work from my lab where we have examined conditions under which people treat robots as intentional agents and attribute mental states to them, as well as consequences that such attributions have for other cognitive processes. I will also discuss how attentional orienting, sensorimotor processes, and sense of agency unfold in interaction with humanoid robot partners. I will discuss these results in a broader context of using robots at the service of psychological research.