Well first you have to see the context. Thomas asks Jesus, "Lord, we do not know where You are going, how do we know the way?"
I believe that Jesus is telling Thomas that whenever he prays (to his father) he's basically talking to Jesus himself. In a sense, Jesus is trying to simplify the concept of the Trinity (Which is a very complicated subject).