Awareness of social and historical reality distorted and constrained by class interest. It exists therefore since the fracture of society in classes. Only the appearance of a universal, exploited and revolutionary class generates the conditions that make possible its theoretical - in its political expressions - and practical demolition, in its revolutionary practice.
Ideology and the ruling class
All the ruling classes up to now needed, in order to maintain the system that gave them meaning, to present exploitation as something unavoidable and "natural". The sets of ideas and preconceptions, the "common sense", culture, art, common beliefs, reflect this for every historical mode fo production. Since the production of ideas is part of the productive apparatus of society itself, the ideological production of an era disseminates the interests and views of the ruling class as universal values, reproducing and entrenching the values by which it justifies its rule.
The ideas of the ruling class are the dominant ideas of each epoch; or, in other words, the class which exercises the dominant material power in society is, at the same time, its dominant spiritual power. The class which has at its disposal the means for material production has at the same time at its disposal the means for spiritual production, which makes it subject, on the average, to the ideas of those who lack the means for spiritual production.
Dominant ideas are nothing other than the ideal expression of the dominant material relations, the same dominant material relations conceived as ideas; hence, the relations that make a certain class the dominant class, that is, the ideas of its domination. The individuals who make up the ruling class are also, among other things, conscious of this and think in accordance with it; and so, insofar as they dominate as a class and insofar as they determine the whole scope of a historical epoch, it is understandable that they do so in its fullest sense, and therefore, among other things, also as thinkers, as producers of ideas, who regulate the production and distribution of the ideas of their time; and that their ideas are, by that very fact, the dominant ideas of the epoch.
Marx and Engels. The German Ideology, 1845
All the dominant classes need to present their programs and needs as universal progress, as objectives of the social whole. And they need to do so, first of all, as self-justification. We have no reason to think that the bourgeoisie is not sincere when it identifies the "interest of all" with the interest of the nation -that is, the interest of national capital- by demanding that we willingly accept worse living and working conditions or that we slaughter each other during a war. But the bourgeoisie cannot conceive of any other form of social organization than its own, which gives it meaning as a class. If it could do so, it would question itself. The ideology of the ruling class is not just a mask: it limits its conception of society and the world to the extent that it cannot conceive of its interests clashing with those of society as a whole. Ideology is an interested and false consciousness of reality, limited and limiting.
Ideology under state capitalism
In state capitalism, it is not individuals of the upper bourgeoisie directly and personally, as was relatively common in its centuries of rise, who elaborate the ideological forms that "grease" the system and guide it in exercising its dominance. Ideology is not a Machiavellian product of a state or corporate cabinet that thinks openly in terms of class struggle. It is a social product that is produced organically within the specialized apparatus of capital. There are state organs, such as the university, political parties, media, unions, think-tanks and all kinds of groupings, dedicated specifically to creating ideology by absorbing "trends", weighing up their consequences and promoting new "causes" and world views.
These professional ideologues generally belong to the petty bourgeoisie and much of what they produce bears their stamp, from populism to feminism. Given the nature of this middle class and their reactionary expectations, nothing they can really create is a real danger to capitalism as such even if it can, on occasion, put a stick in the wheel of the interests of national capital or its ruling factions. The "protest" ideologies of the petty bourgeoisie throw sand in the eyes of discontent and anger. Of course, this may well be unconscious to those who propose it, which is why it is ideology, but it takes on materiality as it is socially produced. That is, as it elicits the consensus of different sectors of power, building itself into a "social truth" through the means and action of the political apparatuses that are dedicated to framing the people under the state and for the interests of national capital.http://dictionary.marxismo.school/Ideology