In verses 41 & 42, we find Jesus explaining the importance of not judging other people's motives. He illustrates his point by explaining it is like someone who has a plank in his eye trying to remove a speck out of his brother's eye. In essence the plank and the speck are the same size (ie. sin) seen from a different viewpoint. We definitely can't see to help remove the sin in another person's life when we have the same sin in our own. Only God can truly do this, we just need to make sure we deal with our own sin.
Next we see Jesus using trees as an example. Our fruit depends on the kind of tree we are. When we are living by the Holy Spirit, we will be characterized by bearing the fruit of the Spirit. (Galatians 5:22-23) Our fruit shows whether or not our heart is good or evil. We can easily say the word "Lord" but not necessarily mean it from the heart. Jesus places great emphasis on this fact. Only he can see into our hearts and knows whether or not what we say is genuine.
The following can better be described from Matthew 7:24-27. Jesus is describing a house that stands. One who has a strong house has built it on the very words of Christ. Those who choose not to build their foundation on Christ alone will eventually fall.