When discussing, "Dialectics", we need to categorize its meaning, since it ranges from the elementary, to the abstract.
The word, "Dialectic", is an etymologically Greek word which literally meant-(and still means), "two words" or more accurately, two words in opposition to each other or two opposing words. It is somewhat related to another Greek word, "Dialogue"/ ("Dialogos"); though unlike the word, Dialogue, which has remained within the realm of speech, drama and rhetorical exchanging, the word, "Dialectic", has had an interesting and at times, complicated historical evolution.
The philosophical concept of "Dialectics" originated with the Greeks around 2500 years ago with an Anatolian/Ephesian Philosopher named, Heraclitus. It was Heraclitus' paradoxical proverbs-("A road going up and a road going down are one and the same" & "War is the Father of all things"), that helped to influence a popular movement within Greek Philosophy for many centuries. However, with regard to the examination, analysis and teaching of History and Economics, the Ancient Greeks did not incorporate Dialectics. For the Greeks, Dialectics, was both rhetorical, as well as philosophical, though had no relation to the Historical or the Economic.
However, that would change with the arrival of George Hegel 200 years ago. It was Hegel's Grand Philosophy of History which borrowed the Ancient Greek concept of Dialectics and applied it to the examination and analysis of World History with his famed, "Thesis, Antithesis and Synthesis"-(A + ~A = A/~A or B...which would then become the starting point of a new A or a new Thesis). Hegel was perhaps the First Western Philosopher (or perhaps even the First Philosopher), to comprehensively describe Historical Time and Reality, as a continuous series of opposing forces that was governed or influenced by a Greater Force known as the Geist or "Spirit of the Age".
In the case of Karl Marx, Dialectics, would also play a very central role in his Philosophical worldview. However, unlike Hegel, who designed his Dialectical History as a reflection of a greater "Geist", Marx, adamantly rejected such quasi mystical sounding language, though did incorporate the Hegelian formula into another discipline that was also intellectually underdeveloped....Economics.
Marx took Greek and Hegelian Dialectics and applied it to Economic Theory. He coined a phrase that remains synonymous with Marxism...."Class struggle". For Marx, the relationship between the Capitalistic class and the Proletariat class, was an oppositional or dialectical relationship-(a.k.a. "class struggle"). These opposing economic forces, would, at some point in time, lead to an eventual and inexorable revolution-(not necessarily a street fighting revolution, but a revolution in terms of Grand or Radical social transformation) that was to occur through an abstract and paradoxical process called, "Dialectical Materialism". Societies would have to undergo a cyclical transformation as a way of fulfilling a materialistic end or goal. In the case of Marx, the Materialistic end or goal, was the Communist Utopia. Marx hoped-(rather naively), that all hierarchical systems-(including political and especially, economic/capitalistic systems), would be dissolved through the process of Dialectical Materialism. Its result or end, would be Communism...a system that is predicated on Universal self-governance and equality.