 In physics, we define flux for flow quantity or fields which are analogous to flow quantity like electric field or magnetic field. For example, in fluid dynamics, the fluid flow is described by velocity field $\vec V,$ which denotes fluid velocity.

The volume of fluid passing through a surface S per unit time is given by flux of velocity field across the surface S i.e. $\int \vec V \cdot \widehat{n} dS$

If S is a closed surface, then flux of velocity field across a closed surface S, $\oint {\vec V \cdot \hat ndS}$ gives the net amount of fluid flowing across the closed surface S per unit time.

If $\oint {\vec V \cdot \hat ndS = 0}$ then one of the following cases will hold

(a) There is neither source or sink and amount of liquid flowing in and out of the surface S is equal. So, the net inflow or outflow is zero.
(b) There is a source and sink of equal magnitude and amount of liquid flowing in and out of the surface is zero. Also, there is no net inward or outward flow.

If $\oint {\vec V \cdot \hat ndS} > 0$, there is net outward flow and hence there must exist a source of fluid flow or there exist a source and sink both but strength of source is more than sink.

If $\oint {\vec V \cdot \hat ndS} < 0$ there is net inward flow and hence there must exist a sink of fluid flow or there exist both a source and sink but strength of sink is more than that of source.

So, non-zero value of flux of a flow quantity across a closed surface denotes existence of source or sink of that flow quantity. Not only this, the magnitude of flux linearly depends on strength of source or sink.
The electric field though itself does not represent flow quantity but can be treated analogous to flow quantity. We can visualise the electric field by a curve along which a unit positive test charge would move due to force qE experienced by it if left free in electric field. This curve is called electric line of force. The electric field vector at any point will be tangent to the line of force. So, flux of electric field across a surface can be visualised by the number of lines of force passing across the surface.
If flux of electric field across a closed surface is zero, there is either no source and sink or there are both source and sink but of equal magnitude. Source of electric field is positive charge and sink of electric field is negative charge.

If the flux of electric field across the closed surface is positive, then it signifies the presence of net positive charge in the volume enclosed by the surface S and if the flux is negative then there exists net negative charge inside. Not only this, the magnitude of flux will linearly depend on the magnitude of charge enclosed.

The relation between flux of electric field across the closed surface S and magnitude of charge enclosed by it is given by Gauss Law of Electrostatics.
Let us take some examples to illustrate the meaning of flux.
Consider a square plate of side length a placed in a uniform electric field $E_\circ$.

In general, flux of a vector function or field $\vec F$ across a surface S is defined by surface integral

$\phi = \int\limits_S {\vec F \cdot \hat ndS}$

The flux of electric field is given by

$\phi = \int\limits_S {\vec E \cdot \hat ndS}$ $(\vec E||\hat n)$

$= {E_0}\int\limits_S {dS}$

$= E_0a^2$

$= (\vec E||\hat n)$