Class consciousness, literally, is consciousness of one's social class or economic rank in society.  From the perspective of Marxist theory, it refers to the self-awareness or lack thereof, of a particular class, its capacity to act in its own rational interests, or a measure or assessment of the extent to which an individual or class is conscious of the historical tasks implicit (given the precepts of Marxism) for them.Adding to the definition above, a more broad definition of class consciousness can be described through the transition from a ‘class in itself,“ which is defined as a category of people having a common relation to the means of production, opposed to a ‘class for itself,’ which is defined as a stratum organized in active pursuit of its own interests. 
Class consciousness is the awareness in the existence of several different socio-economic classes and, further, realization of the great impact that class has on people. Members of "lower" classes often have a greater class consciousness than do members of the "upper" class. However, this may not necessarily be the case in societies where class hierarchy is a strict and deep tradition.
The United States has the majority of its class-related issues clouded by race. People of color in the United States are generally less well-off financially than whites. A more delicate degree of class consciousness would make one aware that all poor people in this country have a common ground that goes deeper than racial divides.  Defining one’s social class can be a determinant for their awareness of class consciousness. The best indicator of social class is occupation rather than income. With that being said, both occupation and income can place people into different social classes. Classes are the more or less distinct social groupings which at any given historical period can be distorted. Different social classes may be distinguished by inequalities in such areas as power, authority, wealth, working and living conditions, life-styles, life-span, education, religion, and culture.
Early in the nineteenth century the labels "working classes" and "middle classes" were already coming into common usage. “The old hereditary aristocracy, reinforced by the new gentry who owed their success to commerce, industry, and the professions, evolved into an "upper class" (its consciousness formed in large part by public schools (in the British sense) and Universities) which tenaciously maintained control over the political system, depriving not only the working classes but the middle classes of a voice in the political process.”  These disparities can cause a person to develop consciousness of their situation in the class structure of society.
Class consciousness, as described by Georg Lukács's famous History and Class Consciousness (1920), is opposed to any psychological conception of consciousness, which forms the basis of individual or mass psychology (see Freud or, before him, Gustave Le Bon). According to Lukács, each social class has a determined class consciousness which it can achieve. In effect, as opposed to the liberal conception of consciousness as the basis of individual freedom and of the social contract, Marxist class consciousness is not an origin, but an achievement (i.e. it must be "earned" or won). Hence, it is never assured: the proletariat's class consciousness is the result of a permanent struggle to understand the "concrete totality" of the historical process.
According to Lukács, the proletariat was the first class in history that may achieve true class consciousness, because of its specific position highlighted in the Communist Manifesto as the "living negation" of capitalism. All others classes, including the bourgeoisie, are limited to a "false consciousness" which impedes them from understanding the totality of history: instead of understanding each specific moment as a portion of the historical process, they universalize it, claiming it is everlasting. Hence, capitalism is not thought as a specific phase of history, but is naturalized and thought of as an eternal solidified part of history. This "false consciousness", which forms ideology itself, is not a simple error as in classical philosophy, but an illusion which can't be dispelled. Marx described it in his theory of commodity fetishism, which Lukács completed with his concept of reification: alienation is what follows the worker's estrangement to the world following the new life acquired by the product of his work. The dominant bourgeois ideology thus leads the individual to see the achievement of his labour take a life of its own. Furthermore, specialization is also seen as a characteristic of the ideology of modern rationalism, which creates specific and independent domains (art, politics, science, etc.). Only a global perspective can point out how all these different domains interact, argues Lukács. He also points out how Kant brought to its limit the classical opposition between the abstract form and the concrete, historical content, which is abstractly conceived as irrational and contingent. Thus, with Kant's rational system, history becomes totally contingent and is thus ignored. Only with Hegel's dialectic can a mediation be found between the abstract form and the abstract notion of a concrete content.
Even if the bourgeois loses his individual point of view in an attempt to grasp the reality of the totality of society and of the historical process, he is condemned to a form of false consciousness. As an individual, he will always see the collective result of individual actions as a form of "objective law" to which he must submit himself (liberalism has gone so far as seeing an invisible hand in this collective results, making capitalism the best of all possible worlds). By contrast, the proletariat would be, according to Lukács, the first class in history with the possibility to achieve a true form of class consciousness, granting it knowledge of the totality of the historical process. The proletariat takes the place of Hegel's Weltgeist ("World Spirit"), which achieves history through the various Volkgeist ("Folk Spirits"): the idealist conception of an abstract Spirit making history, which ends in the realm of Reason, is replaced by a materialist conception based not on mythical Spirits, but on a concrete "identical subject-object of history": the proletariat. The proletariat is both the "object" of history, created by the capitalist social formation; but it is also the "subject" of history, as it is its labour that shapes the world, and thus, knowledge of itself is also, necessarily, knowledge of the reality and of the totality of the historical process. The proletariat's class consciousness is not immediate; class consciousness musn't be mistaken either with the consciousness of one's future and collective interests, opposed to personal immediate interests. The possibility of class consciousness is given by the objective process of history, which transforms the proletariat into a commodity, hence objectifying it. Class consciousness is thus not a simple subjective act: "as consciousness here is not the consciousness of an object opposed to itself, but the object's consciousness, the act of being conscious of oneself disrupts the objectivity form of its object" (in "Reification and the Proletariat's Consciousness" §3, III "The proletariat's point of view"). In other words, instead of the bourgeois subject and its corresponding ideological concept of individual free will, the proletariat has been transformed into an object (a commodity) which, when it takes consciousness of itself, transforms the very structure of objectivity, that is of reality.
This specific role of the proletariat is a consequence of its specific position; thus, for the first time, consciousness of itself (class consciousness) is also consciousness of the totality (knowledge of the entire social and historical process). Through dialectical materialism, the proletariat understands that what the individual bourgeois conceived as "laws" akin to the laws of nature, which may be only manipulated, as in Descartes's dream, but not changed, is in fact the result of a social and historical process, which can be controlled. Furthermore, only dialectical materialism links together all specialized domains, which modern rationalism can only think as separate instead of as forming a totality.
Only the proletariat can understand that the so-called "eternal laws of economics" are in fact nothing more than the historical form taken by the social and economical process in a capitalist society. Since these "laws" are the result of the collective actions of individuals, and are thus created by society, Marx and Lukács reasoned that this necessarily meant that they could be changed. Any attempt in transforming the so-called "laws" governing capitalism into universal principles, valid in all times and places, are criticized by Lukács as a form of false consciousness.
As the "expression of the revolutionary process itself", dialectical materialism, which is the only theory with an understanding of the totality of the historical process, is the theory which may help the proletariat in its "struggle for class consciousness". Although Lukács does not contest the marxist primacy of the economic infrastructure on the ideological superstructure (not to be mistaken with vulgar economic determinism), he considers that there is a place for autonomous struggle for class consciousness.
In order to achieve a unity of theory and praxis, theory must not only tend toward reality in an attempt to change it; reality must also tend towards theory. Otherwise, the historical process leads a life of its own, while theorists make their own little theories, desperately waiting for some kind of possible influence over the historical process. Henceforth, reality itself must tend toward the theory, making it the "expression of the revolutionary process itself". In turn, a theory which has as its goal helping the proletariat achieve class consciousness must first be an "objective theory of class consciousness". However, theory in itself is insufficient, and ultimately relies on the struggle of humankind and of the proletariat for consciousness: the "objective theory of class consciousness is only the theory of its objective possibility".