Finding the tangent plane equation is simple for equations with a simple $z$. For example, if $z$ is a function $f(x,y)$ such as $f(x,y)=x^2+y^3$. It's simply:
$z-z_0=f_x(x_0,y_0)(x-x_0)+f_y(x_0,y_0)(y-y_0)$
Which in that case would be:
$z-z_0=(2x)(x-x_0)+(3y^2)(y-y_0)$
But what if we're dealing with a more complicated $f(x,y,z)$ where values are not necessarily unique along the $z$ axis?
Wouldn't we have to add a $f_z$ term?
The gradient vector $$\nabla f = \left(\frac{\partial f}{\partial x} , \frac{\partial f}{\partial y} ,\frac{\partial f}{\partial z} \right)$$ is normal to the surface $f(x,y,z)=0$. If $(x_0,y_0,z_0)$ is a point on your surface then the tangent plane is the plane passing through $(x_0,y_0,z_0)$ and perpendicular to $(\nabla f)(x_0,y_0,z_0)$.
If you have some set given by several equations, say $f(x,y,z)=0$ and $g(x,y,z)=0$, then the tangent space to this set is given by kernel vectors of the Jacobian matrix.
*I have assumed that everything here is smooth and intersections are transverse.