To calculate the derivative of a function (rate of change of a function at a point), you have to find the slop of a function. As simple as that, because slope represents the rate of change at a point.
There are different rules to calculate the differentiation/derivative of a function. The common rules you will use a lot is product rule.
There are other as well such as: Chain Rule, Quotient Rule, Power Rule, Exponential Rule, Logarithmic Rule, Trigonometric Rule, etc. Each of these rules have specific use cases.
For example, The Trigonometry rule is used when dealing with trigonometric functions like Sin, Cos, Tan, Sec, etc