(see also Chern-Weil theory, parameterized homotopy theory)
Given a right principal $G$-bundle $\pi: P\to X$ and a left $G$-action on some $F$, all in a sufficiently strong category $C$ (such as Top), one can form the quotient object $P \times_G F = (P\times F)/{\sim}$, where $P \times F$ is a product and $\sim$ is the smallest congruence such that (using generalized elements) $(p g,f)\sim (p,g f)$; there is a canonical projection $P\times_G F\to X$ where the class of $(p,f)$ is mapped to $\pi(p)\in X$, hence making $P\times_G F\to X$ into a fibre bundle with typical fiber $F$, and the transition functions belonging to the action of $G$ on $F$. We say that $P\times_G F\to X$ is the associated bundle to $P\to X$ with fiber $F$.
In the context of higher topos theory there is an elegant and powerful definition and construction of associated bundles. We discuss here some basics and how this recovers the traditional definition. For more see at associated infinity-bundle and at geometry of physics -- representations and associated bundles.
At geometry of physics -- principal bundles in the section Smooth principal bundles via smooth groupoids is discussed how smooth principal bundles for a Lie group $G$ over a smooth manifold $X$ are equivalently the homotopy fibers of morphisms of smooth groupoids (smooth stacks) of the form
Now given an action $\rho$ of $G$ on some smooth manifold $V$, and regardiing this action via its action groupoid projection $p_\rho \colon V//G \to \mathbf{B}G$ as discussed above, then we may consider these two morphisms into $\mathbf{B}G$ jointly
and so it is natural to construct their homotopy fiber product.
We now discuss that this is equivalently the associated bundle which is associated to the principal bundle $P \to X$ via the action $\rho$.
For $G$ a smooth group (e.g. a Lie group), $X$ a smooth manifold, $P \to X$ a smooth $G$-principal bundle over $X$ and $\rho$ a smooth action of $G$ on some smooth manifold $V$, then the associated $V$-fiber bundle $P \times_G V\to X$ is equivalently (regarded as a smooth groupoid) the homotopy pullback of the action groupoid-projection $p_\rho \colon V//G \to \mathbf{B}G$ along a morphism $g \colon X\to\mathbf{B}G$ which modulates $P$
By the discussion at geometry of physics -- principal bundles in the section Smooth principal bundles via smooth groupoids, the morphism $g$ of smooth groupoids is presented by a morphism of pre-smooth groupoids after choosing an open cover $\{U_i \to X\}$ over wich $P$ trivialize and choosing a trivialization, by the zig-zag
where the top morphism is the Cech cocycle of the given local trivialization regarded as a morphism out of the Cech groupoid of the given cover.
Moreover, by this proposition the morphism $(p_\rho)_\bullet$ is a global fibration of pre-smooth groupoids, hence, by the discussion at geometry of physics -- smooth homotopy types, the homotopy pullback in question is equivalently computed as the ordinary pullback of pre-smooth groupoids of $(p_\rho)_\bullet$ along this $g_\bullet$
This pullback is computed componentwise. Hence it is the pre-smooth groupoid whose morphisms are pairs consisting of a morphism $(x,i)\to (x,j)$ in the Cech groupoid as well as a morphism $s \stackrel{g}{\to} \rho(s)(g)$ in the action groupoid, such that the group label $g$ of the latter equals the cocycle $g_{i j}(x)$ of the cocycle on the former. Schematically:
This means that the pullback groupoid has at most one morphism between every ordered pair of objects. Accordingly this groupoid is equivalence of groupoids equivalent to the quotient of its space of objects by the equivalence relation induced by its morphisms:
This is a traditional description of the associated bundle in question.
Norman Steenrod, The topology of fibre bundles, Princeton Mathematical Series 14, 1951. viii+224 pp. MR39258; reprinted 1994
Dale Husemöller, Fibre bundles, McGraw-Hill 1966 (300 p.); Springer Graduate Texts in Math. 20, 2nd ed. 1975 (327 p.), 3rd. ed. 1994 (353 p.)