The derivative is the general expression of the slope, also called gradient or tangent. A straight line has a constant slope, but the slope of a curve varies depending on where you are on the curve.
The derivative was found by considering a tiny part of a curve near a point. An approximation to the slope can be obtained by taking two points close together on a curve and then dividing the vertical distance between the points by the horizontal distance. This gives the tangent of the angle that the slope of the curve makes with the horizontal. The mathematics (calculus) was developed to consider the limit of this slope or tangent as the points move closer together. That limit is called the derivative, and the rules for finding the derivative were later developed directly from the function itself, so that it wasn't necessary to work out the limit from basic mathematical principles.