The function in red is a cubic function.
The function in blue is the derivative of the red function.
The moving green line slides along the red function and is tangent to the red line at every point along the curve.
Here, a tangent line moves from .

Stop the motion at any point by clicking on the button in the bottom left of the graph.
The equation of the green linear function is given.
Verify that the green line is tangent to the red curve.
What is the slope of that tangent line at the point where you stopped it?
What is the value of the coordinate of the blue curve (the derivative) at the point you chose to stop?
Note that the blue function gives the slope of the tangent to the red line at all points in the domain.
The blue function is, therefore, the derivative of the red funtion.