Could somebody please help me by giving an English idiom or proverb used for the people who say something and do exactly opposite
The sort of person you are describing is called a hypocrite. You could also refer to such a person as a fraud, poser, fake or phony.
It's hard to provide a suitable idiom with the information you provided as we don't know what you are trying to communicate with the idiom. The closest I can think of would be 'pot calling the kettle black'.
Such a person is not practising what they preach.
Why would somebody "say something and do exactly opposite"? Is it because they tell other people to do the one thing, but they themselves do a different thing? In that case you could say they have double standards.
A person saying one thing and doing the opposite is today described as a hypocrite, a word that is now imbued with pejorative connotations.The word acquired a moral reflection because of it's ubiquitous use in the Bible and other religious works.However,in the early Greek world,it had an import of Sophistry and Philosophy to a class of professional teachers in ancient Greece who gave instruction in various fields, as in general culture, rhetoric, politics, or disputation.By extension, it also meant the word actor,hence,in time leading to it's having a disparaging, and derogatory inflection.The key to the meaning of this word is degree, as it contains in meaning a vast number of synonyms from a mild 'faker'to a stronger'fraud'.