group cohomology, nonabelian group cohomology, Lie group cohomology
cohomology with constant coefficients / with a local system of coefficients
differential cohomology
In the general context of cohomology, as described there, a cocycle representing a cohomology class on an object $X$ with coefficients in an object $A$ is a morphism $c : X \to A$ in a given ambient (∞,1)-topos $\mathbf{H}$.
The same applies with the object $A$ taken as the domain object: for $B$ yet another object, the $B$-valued cohomology of $A$ is similarly $H(A,B) = \pi_0 \mathbf{H}(A,B)$. For $[k] \in H(A,B)$ any cohomology class in there, we obtain an ∞-functor
from the $A$-valued cohomology of $X$ to its $B$-valued cohomology, simply from the composition operation
Quite generally, for $[c] \in H(X,A)$ an $A$-cohomology class, its image $[k(c)] \in H(X,B)$ is the corresponding characteristic class.
Notice that if $A = \mathbf{B}G$ is connected, an $A$-cocycle on $X$ is a $G$-principal ∞-bundle. Hence characteristic classes are equivalently characteristic classes of principal $\infty$-bundles.
From the nPOV, where cocycles are elements in an (∞,1)-categorical hom-space, forming characteristic classes is nothing but the composition of cocycles.
In practice one is interested in this notion for particularly simple objects $B$, notably for $B$ an Eilenberg-MacLane object $\mathbf{B}^n K$ for some component $K$ of a spectrum object. This serves to characterize cohomology with coefficients in a complicated object $A$ by a collection of cohomology classes with simpler coefficients. Historically the name characteristic class came a little different way about, however (see also historical note on characteristic classes).
In that case, with the usual notation $H^n(X,K) := H(X, \mathbf{B}^n K)$, a given characteristic class in degree $n$ assigns
Moreover, recall from the discussion at cohomology that to every cocycle $c : X \to A$ is associated the object $P \to X$ that it classifies – its homotopy fiber – which may be thought of as an $A$-principal ∞-bundle over $X$ with classifying map $X \to A$. One typically thinks of the characteristic class $[k(c)]$ as characterizing this principal ∞-bundle $P$.
This is the archetypical example: let $\mathbf{H} =$ Top $\simeq$ ∞Grpd, the canonical (∞,1)-topos of discrete ∞-groupoids, or more generally let $\mathbf{H} =$ ETop∞Grpd, the cohesive (∞,1)-topos of Euclidean-topological ∞-groupoids.
For $G$ topological group write $B G$ for its classifying space: the (geometric realization of its) delooping.
For $A$ any other abelian topological group, similarly write $B^n A$ for its $n$-fold delooping. If $A$ is a discrete group then this is the Eilenberg-MacLane space $K(A,n)$.
Generally,
is the cohomology of $B G$ with coefficients in $A$. Every cocycle $c : B G \to B^n A$ represents a characteristic class $[c]$ on $B G$ with coefficients in $A$.
A $G$-principal bundle $P \to X$ is classified by some map $c : X \to B G$. For any $k \in H^n(\mathcal{B}G,\mathbb{Z})$ a degree $n$ cohomology class of the classifying space, the corresponding composite map $X \stackrel{c}{\to} B G \stackrel{k}{\to} \mathcal{B}^n A$ represents a class $[k(c)] \in H^n(X,\mathbb{Z})$. This is the corresponding characteristic class of the bundle.
Notable families of examples include:
for $G = O$ the orthogonal group:
for $G = SO$ the special orthogonal group:
for $G = U$ the unitary group:
for $G = \mathbf{B}U(1)$ the circle 2-group:
the Dixmier-Douady class.
The Chern character is a natural characteristic class with values in real cohomology. See there for more details.
A characteristic class of Lagrangian submanifolds is the Maslov index.
In (Fuks (1987), section 7) an axiomatization of characteristic classes is proposed. We review the definition and discuss how it is a special case of the one given above.
Fuks considers a base category $\mathcal{T}$ of “spaces” and a category $\mathcal{S}$ of spaces with a structure (for example, space together with a vector bundle on it), this category should be a category over $\mathcal{T}$, i.e. at least equipped with a functor $U : \mathcal{S}\to\mathcal{T}$.
A morphism of categories with structures is a morphism in the overcategory Cat$/\mathcal{T}$, i.e. a morphism $U\to U'$ is a functor $F: dom(U)\to dom(U')$ such that $U' F = U$.
Suppose now the category $\mathcal{T}$ is equipped with a cohomology theory which is, for purposes of this definition, a functor of the form $H : \mathcal{T}^{op} \to A$ where $A$ is some concrete category, typically category of T-algebras for some algebraic theory in Set, e.g. the category of abelian groups. Define $\mathcal{H} = \mathcal{H}_H$ as a category whose objects are pairs $(X,a)$ where $X$ is a space (= object in $\mathcal{T}$) and $a\in H(X)$. This makes sense as $A$ is a concrete category. A morphism $(X,a)\to (Y,b)$ is a morphism $f: X\to Y$ such that $H(f)(b) = a$. We also denote $f^* = H(f)$, hence $f^*(b) = a$.
A characteristic class of structures of type $\mathcal{S}$ with values in $H$ in the sense of (Fuks) is a morphism of structures $h: \mathcal{S}\to\mathcal{H}_H$ over $\mathcal{T}$. In other words, to each structure $S$ of the type $\mathcal{S}$ over a space $X$ in $\mathcal{T}$ it assigns an element $h(S)$ in $H(X)$ such that for a morphism $t: S\to T$ in $\mathcal{S}$ the homomorphism $(U(t))^* : H(Y)\to H(X)$, where $Y = U(T)$, sends $h(S)$ to $h(T)$.
Notice that $\mathcal{H}_H \to \mathcal{T}$ in the above is nothing but the fibered category that under the Grothendieck construction is an equivalent incarnation of the presheaf $H$. In fact, since $A$ in the above is assume to be just a 1-category of sets with structure, $\mathcal{H}_H$ is just its category of elements of $H$.
Similarly in all applications that arise in practice (for instance for the structure of vector bundles) that was mentioned, the functor $\mathcal{S} \to \mathcal{T}$ is a fibered category, too, corresponding under the inverse of the Grothendieck construction to a prestack $F_{\mathcal{S}}$.
Therefore morphisms of fibered categories over $\mathcal{T}$
are equivalently morphisms of (pre)stacks
In either picture, these are morphism in a 2-topos over the site $\mathcal{T}$.
So, as before, for $X \in \mathcal{T}$ some space, a $\mathcal{S}$-structure on $X$ (for instance a vector bundle) is a moprhism in the topos
(in this setup simply by the 2-Yoneda lemma) and the characteristic class $[c(g)]$ of that bundle is the bullback of that universal class $c$, hence the class represented by the composite
Textbook accounts include
John Milnor, Jim Stasheff, Characteristic classes, Princeton Univ. Press (1974)
Stanley Kochmann, section 2.3 of Bordism, Stable Homotopy and Adams Spectral Sequences, AMS 1996
Dale Husemoeller, Michael Joachim, Branislav Jurčo, Martin Schottenloher, Basic Bundle Theory and K-Cohomology Invariants, Lecture Notes in Physics, Springer 2008 (pdf)
A concise introduction is in chapter 23
Further texts include
Jean-Pierre Schneiders, Introduction to characteristic classes and index theory (book), Lisboa (Lisabon) 2000
Johan Dupont, Fibre bundles and Chern-Weil theory, Lecture Notes Series 69, Dept. of Math., University of Aarhus, 2003, 115 pp. pdf
Shigeyuki Morita, Geometry of characteristic classes, Transl. Math. Mon. 199, AMS 2001
Raoul Bott, L. W. Tu, Differential forms in algebraic topology, GTM 82, Springer 1982.
D. B. Fuks, Непреривные когомологии топологических групп и характеристические классы , appendix to the Russian translation of K. S. Brown, Cohomology of groups, Moskva, Mir 1987.