Could someone please explain in detail how this is done? For example there is a surface
$$M = \{ (x, y, z) : z = x^4 - 4xy^3 + 6y^2 - 2\}$$
and the question is to find the points on $M$ where this surface has a horizontal tangent plane.
What is implied from having a horizontal tangent plane?
'Horizontal' presumably means parallel to the $z=0$ plane. If the tangent plane at a point on the surface is parallel to the $xy$ plane, the normal to the plane, and thus the normal to the surface at the point is along the $z$ direction.
Your surface is $z(x,y)=x^4-4xy^3+6y^2-2$, so the direction-ratios of the normal at any point are given by its gradient, i.e. $(4(x^3-y^3),12y-12xy^2,-1)$. Now, you have two equations:$$4(x^3-y^3)=0\\12y-12xy^2=0$$The common solutions $(x,y)$ are $(0,0),(1,1),(-1,-1)$.