Internal principal $G$-bundles Let $(C, J)$ be a small site and let $\mathsf{Sh}_{(2, 1)}(C, J)$ be the $(2, 1)$-sheaf topos of sheaves of (small) groupoids on $(C, J)$. Let $G$ be a sheaf of groups on $(C, J)$, and let $\mathbf{Bun}_G$ be the hom-stack $[-, \mathbf{B}G]$, which is typically known as the moduli stack of principal $G$-bundles on $(C, J)$. On the nLab, it is stated that (up to homotopy equivalences), principal $G$-bundles over a given base space $X \in (C, J)$, (i.e. objects of $\mathbf{Bun}_G(X)$) are homotopy pullbacks of the following form:
$\require{AMScd}$
\begin{CD}
P @>>> *\\
@V  V V @VV  V\\
X @>>> \mathbf{B}G
\end{CD}
Would anyone mind explaining to me why this is the case, and moreover, how one might obtain "local trivialisations" out of the above pullback square ? The nLab article I linked does go into these topics, but their explanation is a bit too abstract non-sensical for me to be able to cut through.
 A: The easiest way to see local trivializations is to compute the homotopy pullback using the local projective model structure.
For differential geometry, we can $C$ to be the category of cartesian spaces and smooth maps, whereas $J$ is the usual topology of open covers.
(Other sites work in the same manner.)
Then maps $\def\B{{\bf B}} X→\B G$ in the homotopy category
correspond to maps $Č(U)→\B G$ of presheaves of groupoids,
where $U$ is a good cover of $X$ and $Č(U)$ denotes the Čech nerve of U.
Unfolding this construction, we see that a map $Č(U)→\B G$

*

*sends each $U_i$ to the only object of $\B G(U_i)$;

*sends each intersection $U_i ∩ U_j$ to a morphism in $\B G(U_i∩U_j)$, i.e., a smooth map $t_{i,j}\colon U_i∩U_j→G$;

*for each triple intersection $U_i∩U_j∩U_k$, it enforces a cocycle condition $t_{j,k}t_{i,j}=t_{i,k}$.

This data is precisely the traditional description of principal $G$-bundles in terms of cocycles.
Next, we can compute the homotopy pullback by replacing the map $*→\B G$ with a fibration, namely, $\def\E{{\bf E}} \E G→\B G$,
where $\E G(V)$ is the nerve of the contractible groupoid with its objects being smooth maps $V→G$.
Let's now see what a smooth map $V→P$, i.e., an element of $P(V)$ is in concrete terms.
By definition of a pullback, an element of $P(V)$ can be described
as a pair $(b,f)$, where $b∈Č(U)(V)$, i.e., a smooth map $V→U_i$ for some $i$, whereas $f∈\E G(V)$, i.e., a smooth map $V→G$.
The pullback compatibility condition for objects is trivial because $\B G(V)$ has a single object.
Thus, restricting our attention to a single $U_i⊂X$, we see that
maps $V→P$ are pair of smooth maps $(b\colon V→U_i,f\colon V→G)$,
or, equivalently, a smooth map $τ\colon V→U_i⨯G$.
The manifold $U_i⨯G$ is precisely the total space
of the trivial principal $G$-bundle $U_i⨯G→U_i$ over $U_i$.
Next, let's examine a generic morphism of the form $$(b\colon V→U_i,f\colon V→G)→(b'\colon V→U_i,f'\colon V→G).$$
According to the definition of a pullback, such a morphism is given by a compatible pair of morphisms $b→b'$ and $f→f'$.
By definition of $\E G(V)$, there is a unique morphism $f→f'$,
and its image in $\B G(V)$ is $f'f^{-1}$.
By definition of $Č(U)$, a morphism $b→b'$ exists if and only if
$b$ and $b'$ factor through the intersection $U_i∩U_j$,
in which case such a morphism is unique and its image
in $\B G(V)$ is $t_{i,j}$.
Finally, the compatibility condition amounts to saying $f'f^{-1}=t_{i,j}$.
Collecting all the pieces together, we see that two maps
$(b,f)\colon V→U_i⨯G$ and $(b',f')\colon V→U_j⨯G$ are identified if they satisfy the relation $f'f^{-1}=t_{i,j}$.
This is precisely how the total space of a principal bundle
is glued from individual pieces given by trivial principal bundles over $U_i$ and $U_j$.
Thus, a map $c\colon X→\B G$ picks out principal $G$-bundles,
and for such a map, the homotopy pullback is precisely the total space of the principal $G$-bundle classified by $c$.
