Toward "integrals of rational functions along an algebraic curve" In a talk by V.I. Arnold, this is said:

When I was a first-year student at the Faculty of Mechanics and Mathematics of the Moscow State University, the lectures on calculus were read by the set-theoretic topologist L.A. Tumarkin, who conscientiously retold the old classical calculus course of French type in the Goursat version. He told us that integrals of rational functions along an algebraic curve can be taken if the corresponding Riemann surface is a sphere and, generally speaking, cannot be taken if its genus is higher, and that for the sphericity it is enough to have a sufficiently large number of double points on the curve of a given degree (which forces the curve to be unicursal: it is possible to draw its real points on the projective plane with one stroke of a pen).

I would like to understand the mathematical part of this. What do I need to know to see why this makes sense? Where can I get enough of the background to understand it fully?
 A: What Arnold is describing (in a slightly oblique manner) is the theory of algebraic curves.
The idea is that if one wants to integrate some rational expression $R(x,y)dx + S(x,y) dy$
over the curve $f(x,y) = 0$, then the question of whether one can find an antiderivative
in terms of elementary functions has a positive or negative answer depending on whether
the geometric genus of the curve $f(x,y) = 0$ is zero or positive.
One direction is not so hard to see directly: if $f(x,y) = 0$ has geometric genus zero,
this means that we can trace out this curve in terms of a single parameter, i.e.
we can find parametric expressions $x = x(t)$ and $y = y(t)$ so that $f(x(t),y(t)) = 0$.
Then if we rewrite the integral in terms of the variable $t$, basic integral calculus (the substitution rule) lets us rewrite the integrand as a rational function of $t$, and we can
always integrate a rational function in terms of elementary functions.
What is less obvious is that if $f(x,y) = 0$ has positive geometric genus, then it is not possible to find such a parameterization of the curve (this is a non-trivial statement),
and it is not possible to find an elementary antiderivative (this is related to the previous statement, but is another non-trivial deduction).
The first example is the curve $y^2 = (1-x^2)(1-kx^2)$ (here $k$ is some constant, neither 0 nor 1),
with the integral being $\int dx/y = \int dx/\sqrt{(1-x^2)(1 - kx^2)}$.  This is what is called an elliptic integral, and (for more or less 150 years, beginning with the invention
of calculus) people tried to find an elementary expression for it, until finally Abel and Jacobi showed that this wasn't possible, because this curve has geometric genus one.
If you don't know any algebraic geometry, then a good place to start is Miles Reid's "Undergaduate algebraic geometry".  The theorem you need is the one which says that
there is no rational map from a genus zero curve to a positive genus curve,
which I'm pretty sure is proved in that book, at least for genus one curves.
(It is not so difficult to pass from this theorem in the case of smooth curves to the 
case of singular curves, but you will have more difficulty finding a treatment of the
singular curve case, which is what Arnold is talking about when he mentions double points.)
Depending on the level at which you're beginning, you might want to consult one of the algebraic geometry road-map questions on Mathoverflow; there is one asking for an undergraduate road-map for learning algebraic geometry, and a second asking for a graduate road-map.  
If you do already know some algebraic geometry, then what you want is a historical source
that relates the geometry you know to its historical origins.  Dieudonne wrote a history of algebraic geometry, which must surely discuss this.  There will be many other historical
sources too.  For the best guide to the historical literature, you might want to ask on Mathoverflow, where there will probably be more people reading who are familiar with historical treatments of the theory.  
I should say that if you are beginning from a position of knowing no algebraic geometry, then it will take some time and effort to learn what is needed to fully understand what Arnold is discussing, especially from a standard textbook (which will likely not proceed in a straight line to where you want to go, but rather develop a more general theory, which will then be specialized to the situation you are interested in).
So even if that is your situation, I recommend that you also do some historical reading,
to help get a better feeling for exactly what parts of an algebraic geometry text-book
you will need to read to satisfy your interest in Arnold's statement.
