The meaning of the word sophist has changed greatly over time. Initially, a sophist was someone who gave sophia to his disciples, i. e. wisdom made from knowledge. It was a highly complimentary term, applied to early philosophers such as the Seven Wise Men of Greece.
Eventually, it came to refer to a school of philosophy whose practitioners taught the arts of debate and rhetoric. Protagoras is generally regarded as the first sophist. Other leading 5th-century sophists included Gorgias and Prodicus. Socrates was perhaps the first philosopher to significantly challenge the Sophists in his ideas.
Due to the importance of these skills in the litigious social life of Athens, teachers of such skills often commanded very high fees. The practice of taking fees, coupled with the willingness of many practitioners to use their rhetorical skills to pursue unjust lawsuits, eventually led to a decline in respect for this school of thought.
By the time of Plato and Aristotle, "sophist" had taken on negative connotations, usually referring to someone who used rhetorical sleight-of-hand and ambiguities of language in order to deceive, or to support fallacious reasoning. Socrates, Plato, and Aristotle all challenged the philosophical foundations of Sophism. Eventually, the school was accused of immorality by the state.
Unfortunately most of the original texts written by the sophists have been lost and modern understanding of sophistic movement comes from analysis of Plato's writings. It is necessary to keep in mind that Plato and the sophists had ideological differences and Plato might have benefited from modifying original sophistic arguments when he presented them in his writings. An excellent book on the topic is "The Sophistic Movement" by G. B. Kerferd.
Echoes of Sophism survives today in the language theory of Jacques Derrida and other postmodern rhetoricians who teach that language ought to be deconstructed in order to unpack the intentions of "sophisticated" communicators.