The name "Pharisees" comes from a Hebrew word meaning "separate." This term was applied to this sect because of its extreme devotion to the Mosaic law and commitment to leading a separated life.
This was a reaction of the devout Jews who came back to Jerusalem from the Babylonian captivity, and saw the pagan customs and influences of the Babylonians everywhere. Not only their religion but their identity as a nation was being threatened. The Pharisees were patriots and religious zealots, who in the beginning served a very needed function in the Jewish nation which was struggling for survival.
Over the centuries the Pharisees had departed from the Mosaic law and had written their own interpretations of the law, interpretations which they held to be God-inspired and equal to that of Moses. In Jesus' day this group was characterized by hypocrisy and self-righteousness. They, as a whole, persecuted Jesus and His followers and received the Lord's rebukes.
The Pharisees, like many people, were ignorant of achieving right standing (righteousness) with God through the simple act of receiving His forgiveness by faith and were trying to earn salvation by their own acts. No one can fulfill God's commands (Romans 3:23) except Jesus (Hebrews 4:15).
To be righteous, we must put our faith in what He has done for us.