Theorem (EGA IV 13.1.3): Let $f \colon X \to Y$ be a morphism of schemes, locally of finite type. Then
$$x \mapsto \dim_x(X_{f(x)})$$
is upper semi-continuous.
Corollary (Chevalley's upper semi-continuous theorem, EGA IV 13.1.5): Let $f \colon X \to Y$ be proper, then:
$$y \mapsto \dim(X_y)$$
is upper semi-continuous.
Corollary (SGA3, ??): Let $X/Y$ be a group scheme, locally of finite type. Then
$$y \mapsto \dim(X_y)$$
is upper semi-continuous.
Proof: The dimension of a group scheme over a field is the same as the dimension at the identity. Thus the function
$$y \mapsto \dim(X_y)$$
is the composition of the continuous function $y \to e(y)$ and the upper semi-continuous function $x \mapsto \dim_x(X_{f(x)})$.
Concerning your application: The fiber dimensions of the stabilizer group scheme Stab/X is upper semi-continuous, but the "diagonal" $G \times X \to X \times X$ does not always have this property (unless it is proper, i.e., "$G$ acts properly").
You asked many questions, here are a few things related to some of them:
(1) What does $H^i(X,\mathcal O_X)$ mean?
In the examples you quoted it already shows that it depends a lot on $X$ what these groups mean.
(a1) if $X$ is smooth and projective, then there is the Hodge decomposition, which I am sure is something every topologists appreciate. It tells you that the singular cohomology groups $H^m(X,\mathbb C)$ may be decomposed as the direct sum of the Dolbeault cohmology groups $H^{p,q}(X)$ for $p+q=m$. One of these is isomorphic to $H^m(X,\mathcal O_X)$, so one possible answer to your question is that these cohomology groups give you a piece of the singular cohomology. A particular interesting case is $m=1$. Then $b_1=h^{0,1}+h^{1,0}=2\cdot h^{0,1}$. So, the vanishing or non-vanishing of $H^1(X,\mathcal O_X)$ is equivalent to the same for $H^1(X,\mathbb C)$.
(a2) still in the projective case, there is a duality, called Serre duality, between cohomology groups of $\mathcal O_X$ and those of $\omega_X$, the sheaf of top differential forms (i.e., the determinant of the cotangent bundle). So, $\dim H^i(X,\mathcal O_X)=\dim H^{n-i}(X,\omega_X)$ where $n=\dim X$.
(b) If $X$ is the complement of a closed subset in an affine variety, then higher cohomology of any coherent sheaf is isomorphic to a shifted local cohomology (with supports in the complement). In other words, $H^i(X,\mathcal O_X)\simeq H^{i+1}_Z(\bar X, \mathcal O_{\bar X})$ for $i>0$ where $X=\bar X\setminus Z$. Local cohomology tends to be big (if not zero), and that's the reason for that example you mention.
Of course, now you can ask what local cohomology means, but I'll leave that for another answer/question.
(2) Replacing regular with analytic functions.
Quotients of analytic functions are analytic on their domains of definitions, so while you could define regular analytic functions as those that are locally quotients of analytic functions, you would not actually change the category. The point is that in AG, polynomials are the functions that we can originally define, but it makes sense that as long as the reciprocal of a function exists, then we should be able to use that reciprocal as a regular function. However, those are no longer polynomials, so we need this sort of extended definition.
Best Answer
The semicontinuity theorem (Hartshorne III.11) states that the ranks of cohomology groups on the fibers of a morphism is a semicontinuous function. More precisely, given a projective morphism $f:X\to Y$ of noetherian schemes and a coherent sheaf $F$ on $X$, flat over Y, then the function $$ h^i(y,F)=\dim_{k(y)}H^i(X_y,F_y) $$is upper semicontinuous as a function of $y$. Here $X_y$ denotes the fibre of $f$ over $y$. This is used widely in algebraic geometry.