Why does integrating the function of a curve give you the area under the curve?

You have probably been taught that if you want to find the area under a function / line, you will integrate the equation of the line. But why is it that when you integrate the equation of the line, you get the area underneath the line? Here is a full explanation. p.s. You will need to know basic limits and how to differentiate using first principles.