What does it means by saying "functions defined on the surface of a sphere" upon the quest of understanding spherical harmonics, I came to the a saying "functions defined on the surface of a sphere". 
https://en.wikipedia.org/wiki/Spherical_harmonics
Now what does it mean by "functions defined on the surface of a sphere"? "A function of sphere, f(x,y,z)" is one thing and "functions defined on the surface of a sphere" is surely another thing, isn't it? I am not gettting it quite right. 
 A: For simplicity let us limit ourselves with 3D and scalar functions. In this context "function defined on a sphere" means that you define the way to correspond a number to each point of the sphere. In mathematical terms it is easier to write using spherical coordinates $\theta$ and $\phi$ (radius coordinate is irrelevant here, as all points of the sphere would have the same radius value). So if you have function $f(\theta, \phi)$ defined on $\theta \in [-\pi/2, \pi/2]$, $\phi\in[0, 2\pi[$ this would be the function defined on the sphere. For example, $f(\theta, \phi)=sin(\phi)cos^2(\theta)$ would be such a function. 
Note, that if you want you function to be continuous on the sphere, without 'seam' at $\phi=0$ you should impose condition $f(\theta, 0)=f(\theta, 2\pi)$ (provided your function is defined for $\phi=2\pi$).
Also, as $\theta=-\pi/2$ and $\theta=\pi/2$ correspond to 'north and south poles' of the sphere there should be another condition to avoid singularity there: $f(\pm\pi/2, \phi)=f(\pm\pi/2)$. It means, that function should not depend on $\phi$ at the sphere's 'poles'.
You may define you function in 3D Cartesian space, but then the domain constraints would be more complicated:
$f(x, y, z | x^2 + y^2 + z^2 = 1)$
meaning that function should be defined only for such $x, y$ and $z$ which correspond to unit sphere's surface. It does not mean that it cannot be defined for other points in 3D space, of course, but we are interested only on those on the sphere.
A: The surface of the sphere is a two-dimensional manifold parametrized by two angular variables ($\theta$ and $\phi$), the best analogue is to think of a function (let's say the scalar temperature or the vectorial wind velocity) defined on Earth's surface, and hence depending on two variables - latitude and longitude.
A: When you mention 

"draw a curve on the surface of a sphere",

I do not think this is what the article is suggesting.
When you draw a curve on a surface of a sphere, you are defining a vector valued function $r(t) = x(t)i + y(t)j + z(t)k$ where $i, j ,  k$ are simply unit vectors in the $x$,$ y$ and $z$ direction. This is because the curve you are drawing is just a set of three dimensional coordinates, and given it is nice enough, we can parameterize it, as I did above. This means I made it a function of some parameter, in my example the parameter was $t$ . 
What the article is trying to say is, that the actual DOMAIN of the function is the surface of a sphere. That is, the function is literally a function of the set $S =\lbrace {(x,y,z) | x^2 + y^2 + z^2 = r^2 } \rbrace$
