The existence of a morphism of a compact Kähler manifold to curve of genus $g \ge 2$ is a purely topological fact. This was first proved by Siu, and rediscovered independently by Beauville. The precise statement is the following:
A compact complex Kähler manifold $M$ admits a non-constant morphism to curve of genus $g \ge 2 $ if and only if there exits a surjective homomorphism of the fundamental group of $M$ to the fundamental group of some curve of genus $g' \ge 2$.
This has been generalized by Catanese here, where one can also find Beaville's Beauville's argument.
In general lines the argument goes as follows:
- the morphism of between fundamental groups ensures the existence of a big subspace in $H^1(M, \mathbb C)$;
- Hodge Theory allows one to recognize a space in $H^0(M,\Omega^1)$ of dimension at least $g$ isotropic with respect to the wedge product;
- to conclude one applies Castelnuovo-De Franchis argument.
The existence of morphism to a curve of genus $1$ is more subtle and depends on the analytic structure of $M$, not just on its topology. For instance a general abelian variety has no non-constant morphism to an elliptic curve, but there are many that have.
In a different take there is also the following result by Totaro:
If a projective variety $M$ admits three pairwise disjoint connected hypersurfaces with Chern classes lying on a line of $H^2(M, \mathbb R)$ then $M$ fibers over a curve.
It has to be noted that two pairwise disjoint connect divisors do not suffice to draw the conclusion as the example $M = \mathbb P ( \mathcal O_N \oplus \mathcal L)$ ( with $N$ a projective variety and $\mathcal L$ a line-bundle with zero Chern class on it ) shows.
There is also a generalization of Totaro's result to arbitrary compact complex varieties here.

