What is an intuitive meaning of genus?
I read from the Finnish version of the book "Fermat's last theorem, Unlocking the Secret of an Ancient Mathematical Problem", written by Amir D. Aczel, that genus describes how many handles there are on a given surface. But now I read the Proposition 4.1 on chapter 7.4.1 on Qing Liu's book "Algebraic Geometry and Arithmetic Curves". It assumes a geometrically integral projective curve $X$ over a field such that the arithmetic genus of $X$ is $p_a\leq 0$. So is my intuition that "genus is the number of handles" somehow wrong as $p_a$ can be negative?
A compact Riemann surface $X$ is in particular a compact real orientable surface. These surfaces are classified by their genus.
That genus is indeed the number of handles cited in popular literature; more technically it is
$$g(X)=\frac {1}{2}\operatorname {rank} H_1(X,\mathbb Z) = \frac {1}{2}\operatorname {dim} _\mathbb C H^1_{DR}(X,\mathbb C) $$ in terms of singular homology or De Rham cohomology.
Under the pressure of arithmetic, geometers have been spurred to consider the analogue of compact Riemann surfaces over fields $k$ different from $\mathbb C$: complete smooth algebraic curves.
These have a genus that must be calculated without topology.
The modern definition is (for algebraically closed fields) $$ g(X)=\operatorname {dim} _k H^1(X, \mathcal O_X)= \operatorname {dim} _kH^0(X, \Omega _X)$$
in terms of the sheaf cohomology of the structural sheaf or of the sheaf of differential forms of the curve $X$.
Of course this geometric genus is always $\geq 0$.
There is a more general notion of genus applicable to higher dimensional and/or non-irreducible varieties over non algebraically closed fields: the arithmetic genus defined by $$p_a(X)=(-1)^{dim X}(\chi(X,\mathcal O_X)-1)\quad {(ARITH)}$$ (where $\chi(X,\mathcal O_X)$ is the Euler-Poincaré characteristic of the structure sheaf).
[ Hirzebruch and Serre have, for very good reasons, advocated the modified definition $p'_a(X)=(-1)^{dim X}\chi(X,\mathcal O_X)$, which Hirzebruch used in his ground-breaking book and Serre in his foundational FAC]
For smooth projective curves over an algebraically closed field $g(X)=p_a(X)\geq 0$ : no problem.
It is only in more general situations that the arithmetic genus $p_a(X)$ may indeed be $\lt 0$
Edit
The simplest example of a reducible variety with negative arithmetic genus is the disjoint union $X=X_1\bigsqcup X_2$ of two copies $X_i$ of $\mathbb P^1$.
The formula $(ARITH)$ displayed above yields: $p_a(X)=1-\chi(X,\mathcal O_X)=1-(dim_\mathbb C H^0(X,\mathcal O_X)-dim_\mathbb C H^1(X,\mathcal O_X))=1-(2-0)$
so that $$p_a(X)=p_a(\mathbb P^1\bigsqcup \mathbb P^1)=-1\lt0$$