The rule for differentiation of powers is d(x^n)/dx=nx^(n-1).
The reason is that the difference (x+dx)^n-x^n is x^n+ndxx^(n-1)+n(n-1)(dx)^2x^(n-2)+...-x^n=ndxx^(n-1). The other terms involving dx become very small as dx approaches zero... This can be written d(x^n)/dx=nx^(n-1).
Applying this rule to the whole expression, dy/dx=3x^2-6x. Differentiating a constant is zero, because there is no change to a constant, only variables change.