An example of the first definition of flux is the magnitude of a river's current, that is, the amount of water that flows through a cross-section of the river each second. The amount of sunlight that lands on a patch of ground each second is also a kind of flux.
To better understand the concept of flux in Electromagnetism, imagine a butterfly net. The amount of air moving through the net at any given instant in time is the flux. If the wind speed is high, then the flux through the net is large. If the net is made bigger, then the flux would be larger even though the wind speed is the same. For the most air to move through the net, the opening of the net must be facing the direction the wind is blowing. If the net opening is parallel to the wind, then no wind will be moving through the net. Perhaps the best way to think of flux abstractly is "how much stuff goes through your thing", where the stuff is a field and the thing is the virtual surface.
As a mathematical concept, flux is represented by the surface integral of a vector field,