What is the "instanton configurations of the gauge field"? In the study of the abelian chiral anomaly, one finds that it can be written as the total derivative of a vector operator:
$$\int \mathcal{A}(x)d^4x\propto\int\epsilon_{\mu\nu\rho\sigma}F^{\mu\nu}F^{\rho\sigma}d^4x\propto\int\partial_\mu K^\mu d^4x$$ with $$K_\mu\propto\epsilon_{\mu\nu\rho\sigma}A^\nu\partial^\rho A^\sigma$$
My professor (and Wikipedia) says that the reason why the integral of this total derivative isn't zero is because one can't apply Stokes' Theorem, and this is because the field $A$ is singular somewhere. I found on Wikipedia that this is

"due to instanton configurations of the gauge field, which are pure gauge at the infinity"

and I have no idea what this means.
I also found some other "explanations" like the fact that the $4$-form $\omega_4=F\wedge F$ is closed everywhere but exact only locally, with $\omega_4=d\omega_3$ and $\omega_3=A\wedge d A$, but this seems to me more like a consequence than an explanation.
 A: As a quick answer (but I'm sure there are people here with more to say about instantons, specially in four dimensions) I can say the following. In general it is not true that there exists a globally defined vector potential $A$ such that $F=dA$. To give an example, in the analogous two-dimensional scenario of a two-sphere, you would have an integral like $\int F=\int dA$. F has to be proportional to the volume form, which in spherical  coordinates is  $\sin \theta d\theta\wedge d\phi$  and the integral of $F$ gives a non-zero multiple of $4\pi$. But there is no globally defined $A$: if there was, then  $\int_{S^2} dA = \int_{\partial S^2} A =0 $ because there is no boundary, but we reach a contradiction. The instanton configuration is something like $A=(1-\cos\theta) d\phi$ for a patch covering the North pole, and $A=-(1+\cos\theta)d\phi$ for a patch covering the South pole. As you see, they are different, but on the overlapping region of the patches they only differ by a gauge transformation (that is the fiber bundle twisting Mozibur Ullah refers to in the comment). I'm sure there are explicit analogous expressions in the four-dimensional case, that you ask about.
A: Have you checked ABC of Instantons and https://arxiv.org/abs/0802.1862 ?
Historically they were called pseudoparticles by 't Hooft but later renamed instantons. As you may have already seen, they are localized solutions to the equations of motion of the pure gauge action which have a finite action and have very specific boundary conditions. So the physics motivation is that they can be used as saddle-points in semi-classical treatments. If you want the specific form of instantons with winding number $\pm 1$, check BPST instanton.
This is a long story and needs to be broken down probably depending on what you want to focus on. However it is important to highlight the connection of instantons to topology. The key point here is that the group $SU(2)$ is essentially $S^3$ while four dimensional Euclidean field theories over $\mathbb{R}^4$ for large radius are also an $S^3$ (a shell at infinity), so when the asymptotic behavior of the gauge potentials is constrained to be of pure gauge type, there is a classification of gauge fields given by the classification of maps between $S^3$ and itself $S^3$. This leads to the notion of homotopy classes and are the reason why the $F\tilde{F}$ leads to integers when evaluated over instantons.
