Say you want to know the total amount of flux through a particular surface, or in other words the extent to which a vector field peers is through that surface. In this case you would integrate over all contributions where the infinitesimal patch DA is perpendicular to the surface. This is called a surface integral. If the surface is closed, it is a closed surface integral and it is customary to choose the direction of the surface patch outwards. But if it is an open surface, the direction is arbitrary. Just make sure to keep track of your choices and choose wisely. The surface integral plays an important role in the divergence theorem, Stokes theorem, Gauss's law and other Maxwell equations.