Here we are in the midst of the Sermon on the Mount. Jesus is teaching His disciples, a message which opened with the Beatitudes and now goes on to talk about the disciples and their relationship with the world. The Sermon on the Mount deals with that subject at length, as well as the matter of the disciples' relationship with God.
It is these two areas that we often think are in conflict, but Jesus makes clear that they are not. In fact, your relationship with God is interdependent with your relationship with the people around you. That is not to say that people should be your boss--only God is your God, not anyone else. But if the Beatitudes of Matthew 5:3-12 started you thinking that your relationship with God would be better if you just ducked away and never interacted, that thought should be cut off by the next two paragraphs. We are to be salt and light, clear to the world and affecting the world around us.
After all, salt doesn't do much if it is not with other items. And a light that cannot be seen is just wasting itself. The next several sections build on this idea. First, Jesus highlights that He is the fulfillment of the Law, not someone who will cancel it. The Law was based in the holiness of God, and that holiness will never change. How we live still matters, because otherwise we are destroying others. The Law, though, was not enough because adultery and murder are outside actions but righteousness requires that we stop at the inner thoughts which spark those actions.
And note that Jesus brings forward conflict with your fellow worshippers as a danger in the same realm as murder. Here is where we find that fixing a relationship is as important as bringing a sacrifice to the altar. Then we see that adultery begins as lust, and lust is worth removing body parts to fix. Now, should be actually go cutting off hands and gouging out eyes?
No. Why do we not take this literally? Because we read the text in context, understanding what is being said. Jesus points out that adultery begins as a heart problem. You cannot cut off your hand to fix your heart. He is driving to the real problem: your hearts are not just restless until we find God. Our hearts are dead without the Spirit of God. And we'll be far better off to let Him take that old heart straight out.
Going through the rest of the passage, we have instructions about fasting, giving, and prayer. There is a continued emphasis that our hearts must be right before God and our lives must be lived to draw others to Him.
There are whole books written on just portions of the Sermon on the Mount, so we cannot possibly cover it all here. Take up and read, and let God change you through His word. What should come through this is that our lives will not be the same with Jesus as they would have been without Him. If we are not different in our living, if our lives cannot be easily seen as lives committed to Christ, then we should reconsider and reread.