For this explanation, I am assuming that we are not integrating or differentiating constant functions.
When we take a derivative of a function, we are calculating the value of the slope of that function and looking at how it changes with respect to a variable. Using these values we create a graph of a new function whose values reflect the values of the slope of the function we took the derivative of. ie,looking at how the slope of a function changes with respect to a variable.
If we look at a specific point on a graph, we can determine a specific value of that function. How these values change with respect to a variable is the definition of a slope.
When we take the integral of a function, we are looking at adding up the area under the curve of a function. This area gives us a range of values that if we plot will give us a different function. Remember, how the values of this new function change with respect to a variable is the definition of a slope!
Therefore, if I take the integral of one function, I can graph the values obtained and produce the graph of a different function. This new function will have slopes associated with the range of values produced by the area under the curve. Now, by taking the derivative of this new function, that is, by looking at how the value of the slope changes with respect to a the variable, we will produce the original function we first integrated.
Example:
The easiest way to see this is by looking at sin θ and cos θ functions. This is easy to see if you line up a cos θ function directly underneath a sin θ function.
By taking the integral of cos θ, we are finding the value of the sin θ function at different locations on the graph with respect to θ. That is, when we add up the area under the cos θ function from 0 to pi/2, we get a number that reflects the largest positive value of the sin θ function. If we then continue to add up the area of under the curve of cos θ from 0 to pi, we get a number which represents the value of the sin θ function. In this particular case, the value is zero, since the area of cos θ from 0 to pi/2 is a positive value and from pi/2 to pi is the same value, but negative. Adding these up cancels each other out and gives us a value of zero.
Conversely, by taking the derivative of the sin θ function, we get a cos θ function which tells us how the slope of the sin θ function changes with respect to θ. When the sin θ function is at its largest positive value, the cos θ function has a value of zero. This is because the slope of sin θ at pi/2 is leveled out, and therefore has a value of zero. When the sin θ function has a slope who value reflects its largest negative slope, the value of the cos θ function is at its largest negative value. And so on and so forth.
I hope this helps!