In most cases we differentiate with respect to a certain variable. But if the function is not explicitly in terms of the variable in question you need to use the chain rule.

These tutes are really good for your understanding

Implicit Differentiation

Visual Calculus - Implicit Differentiation