flux is computed by an integral. sometimes that integral can be computed directly, in which case none of those theorems is needed. usually flux means rate of flow of a moving substance across a boundary of some kind. inflow is measured negatively to cancel outflow, so total flux is outflow minus inflow. in the plane one can measure flux across a closed curve bounding a plane region. If the substance, like water, is assumed incompressible, then the same amount will flow in that flows out in a given unit of time, unless water is welling out of a source, like a spring, inside the closed curve, or unless some water is disappearing into a hole. In general the total outflow across the boundary curve will equal the amount welling from springs minus the amount disappearing down holes in the region inside the curve.
That statement is called Green's theorem. The flow is measured by a path integral around the boundary curve, and the total amount generated within the region, is measured by a double integral taken over the region. Thus either one of those integrals will measure the flux.
Some times one or the other of those integrals is easier to compute than the other. E.g. in the case of no wells or holes in the region, the double integral be just be the integral of zero, so that is the easy one. The path integral, even though it all cancels out in the end, will be harder to compute in that case, so that is one time to use the theorem.
The divergence theorem refers to the same situation noly in 3 - space instead of the plane. This time there is a closed surface bounding a solid region, and some substance flowing across that boundary substance. A certain surface integral measures the flow per unit of time. If you can do that integral, that is one way to measure the flux.
Again it is true that the total flux equals the amount of the substance generated inside the region minus the amount disappearing into sinks in the region. This difference , or this total "divergence" of the substance out from the region, is measured by a solid integral taken over the inside of the region. The fact that the two integrals are equal is called the divergence theorem. Again both integrals measure the same thing and you want to use the easier one.
It is a good idea to always compute the second integrand, the one for the integral over the inside of the region, to see if it comes out zero, or a constant, or something easy to integrate before trying to evaluate the first integral.
I.e. the flux itself is by definition given by the boundary integral, and the other integral over the inside of the region is an alternative way to compute it which may or may not be easier.
There is also a twist on Green's theorem when you want to measure the amount by which the substance flows around the boundary curve instead of across it. It is the same theorem after a 90 degree rotation, and is also called Green's theorem.
stokes theorem, relates an integral around a space curve to an integral over a surface bounded by that curve. i don't see intuitively how to view that as a "flux" but maybe I am limited in my imagination.