"All past history, with the exception of the primitive stages, was the history of class struggle, that these warring classes of society are always the products of the modes of production and exchange in the economic conditions of their time"
Frederick Engels, Socialism, Utopian and Scientific
Historical materialism is the programme of historical and sociological research inspired by dialectical materialism. Based on the writings of Marx and Engels, it regards material economic forces as the base on which sociopolitical institutions and ideas are built, and shamelessly privileges the economic in explanation of non-economic phenomena.
According to the Marx and Engels, the fundamental thing in human history is the productive powers of society and their tendency to grow. Productive power at a given stage of development determines the nature of human labour because labour exists in the exercise of those powers. A given set of productive powers favours certain "material relations of production" - forms of human co-operation (or division of labour) which are not directly part of the productive powers, but facilitate their employment to a greater degree than other forms.
Certain modes of production also favour "social relations of production" - systems of social roles relating to the control of the production process and the distribution of its fruits. It is this system of social relations of production which Marx calls the "economic structure of society". This structure forms the "real basis" of social life on the materialist theory, conditioning "superstructures" such as the political state and the "ideological" forms of consciousness found in religion, philosophy, morality, and art.
It is worth noting that "conditioning" doesn't mean "absolutely determines" - the relation between base and superstructure is uneven, historically contingent, and therefore variable - the base may be dominant at some points, but at other points the superstructure may be dominant
In Marxian theory, historical materialism was closely associated with the thesis that the rule of the bourgeoisie is incompatible with the continued growth of productive forces, and that capitalism is therefore doomed to be overthrown by the revolutionary proletariat. This is yet to happen in practice, but feel free to /msg me if it does.