The mean curvature of a surface at a point is an extrinsic quantity. The Gaussian curvature is an intrinsic quantity. The mean curvature is the average of the two principal curvatures; the Gaussian curvature is the product of the principal curvatures. The principle curvatures are extrinsic quantities.
It is not at all obvious that the Gaussian curvature is an intrinsic property, but it is.
You asked (in a comment) for a formal definition of extrinsic vs. intrinsic. Here goes, at least for scalar-valued functions on surfaces. Suppose we have a definition for such a function, so for any surface $S$ the definition gives us a function $f_S$ on $S$. For an intrinsic function (like Gaussian curvature), the following holds:
For any distance-preserving bijection $\psi:S\rightarrow T$ to another surface, and for any point $p$ on $S$, the value of $f_S$ at $p$ will equal the value of $f_T$ at $\psi(p)$: $f_S(p)=f_T(\psi(p))$.
For example, let $S$ be a (flat) rectangle, and let $T$ be half a cylinder, obtained by bending the rectangle along one axis, so that that axis becomes a semi-circle of radius $r$. So we have a bijection $\psi:S\rightarrow T$ (the "bending map"). Let $p$ be a point in the middle of the rectangle. The principal curvatures at $p$ are 0 and 0, since any two lines through $p$ are straight. The principal curvatures at $\psi(p)$ are 0 and $1/r$. The Gaussian curvature is 0 in both cases, but the mean curvature is 0 on the rectangle and $1/2r$ on the semi-cylinder. (Of course, this example doesn't prove in general that the Gaussian curvature is intrinsic, but it does show that mean curvature is not intrinsic---i.e., extrinsic.)
Caveat: the definition above is clumsy and crude (though not wrong) in ways that would take too long to explain fully. Briefly, intrinsic vs. extrinsic still makes sense locally. (Curvature after all can be defined locally.) Also, dealing only with scalar-valued functions is too restrictive. However, we need a coordinate-independent definition of tensors for a "good" definition, which is another whole story.
The definition for general manifolds is pretty much the same: isometric invariants. In other words, just replace the word "surface" with "$n$-dimensional manifold".
You also asked for a reference. I looked in a few books, but they don't provide formal definitions of intrinsic vs. extrinsic. Here is a typical discussion from Tu's Differential Geometry: Connections, Curvature, and Characteristic Classes:
For a surface in $\mathbb{R}^3$ we defined its Gaussian curvature $K$ at a point $p$ by taking normal sections of the surface, finding the maximum $\kappa_1$ and the minimum $\kappa_2$ of the curvature of the normal sections, and setting $K$ to be the product of $\kappa_1$ and $\kappa_2$. So defined, the Gaussian curvature evidently depends on how the surface is isometrically embedded in $\mathbb{R}^3$.
On the other hand, an abstract Riemannian manifold has a unique
Riemannian connection. The curvature tensor $R(X,Y)$ of the Riemannian
connection is then completely determined by the Riemannian metric and
so is an intrinsic invariant of the Riemannian manifold, independent
of any embedding...
You'll also find good discussions in Gravitation (Misner, Thorne, and Wheeler, $\S21.5$, "Intrinsic and Extrinsic Curvature"), and a historical treatment in Ch.4 of Wells, Differential and Complex Geometry: Origins, Abstractions and Embeddings.
The basic idea is that anything defined using only the metric (and the differential manifold structure) must be an isometric invariant. That's why you'll find the phrase "intrinsically defined" often used.
Finally, let me address one possible source of your confusion. I've been talking about "intrinsic" vs. "extrinsic" in the context of differential geometry, and for local properties (like curvature). But the terms are generally used informally, to contrast properties that depend only on the "abstract manifold" vs. an imbedding of the manifold. The other answer to your question (by gandalf61) gives a couple of good topological illustrations. The knottedness property depends on the imbedding of the circle in $\mathbb{R}^3$. Orientability on the other hand is a homeomorphism invariant, depending only on the topology of the space.
Best Answer
According to my knowledge and experience, sometimes proofs are more intuitive or clear and less technical, sometimes conversely.
To balance the opinions from books your read I present two others:
Nicolas Bourbaki: “the mathematician does not work like a machine, nor as the workingman on a moving belt; we can not over-emphasize the fundamental role played in his research by a special intuition, which is not the popular sense-intuition, but rather a kind of direct divination (ahead of all reasoning) of the normal behavior, which he seems to have the right to expect of mathematical beings, with whom a long acquaintance has made him as familiar as with the beings of the real world”
Henri Poincaré wrote a paper “Mathematical Creation”. You may also look at his paper “Intuition and Logic in Mathematics” (for instance, in this book).
PS. A few of my old answers to similar MSE questions: