This is a substantial revision of my previous answer based on the comments and the other answers. I am making it community wiki for two reasons: it incorporates ideas from my answer (for which I already have gained reputation), as well as ideas form the other posts (for which I do not deserve reputation!); people can edit it to correct mistakes and typos that are certainly present.

In what follows I will frequently not specify that a morphism is assumed to be non-constant; I will leave it to the reader to figure out when the word "non-constant" can be added! Moreover, I will only address the question of a variety of dimension at least two mapping to a curve: the case of curves can be made very difficult by specifying the question further, but I will not worry about this.

First, the question in the title asks about morphisms to a curve. We shall see that there are differences based on the Kodaira dimension of the target curve, the higher the dimension, the more rigid the situation: we go from negative Kodaira dimension (target of genus zero) where the property is neither a birational, nor deformation invariant; to zero Kodaira dimension (target is a curve of genus one) where the property is a birational invariant, but not deformation invariant; to positive Kodaira dimension (target of genus at least two) where the property is both a birational invariant and a deformation invariant (and more!). Let's start.

If a variety $X$ admits a non-constant morphism to a curve, then it admits a non-constant morphism to $\mathbb{P}^1$ (just compose the given morphism with a morphism of the curve to $\mathbb{P}^1$). Thus, if you only care about existence of a non-constant morphism to a curve, you may as well restrict your attention to the question of existence of a non-constant morphism to $\mathbb{P}^1$. The property of admitting a morphism to $\mathbb{P}^1$ is clearly not a birationally invariant property, as any non-constant rational function determines a rational map to $\mathbb{P}^1$ (see Charles Matthews' answer and think of $\mathbb{P}^2$). It is also not a deformation invariant property, as the example of a family of quartic surfaces in $\mathbb{P}^3$ containing a quartic with Picard number one and a quartic with a line clearly shows.

For this general case there is an easy necessary condition.

**Lemma 1.**
*Let $X$ be a smooth projective variety of dimension at least two and let $f \colon X \to \mathbb{P}^1$ be a non-constant morphism. Then there are on $X$ two non-zero disjoint effective linearly equivalent divisors $D_0,D_1$. In particular, there are on $X$ nef divisors that are not ample and hence the Picard number of $X$ is at least two.*

*Proof.* Just let $D_0$ and $D_1$ be the fibers of the morphism $f$ above two distinct points. For the second statement, if the Picard number of $X$ were equal to one, then any non-zero effective divisor $H$ on $X$ would be ample, and in particular we would have $D_0 \cdot D_1 \equiv H^2 \neq 0$, contradicting the fact that $D_0$ and $D_1$ are disjoint. $\square$

As Donu Arapura remarks, a variation of Lemma 1 also works for non-constant morphisms to varieties $Y$ of dimension smaller than the dimension $X$. In this case we loose the fact that the divisors are linearly equivalent, but we can still find $\dim(Y)+1 \leq \dim(X)$ (Weil) divisors on $Y$ whose intersection is empty. Their pull-backs to $X$ give us $\dim(Y)+1$ divisors with empty intersection; again it follows that the Picard number of $X$ is at least two (see Donu Arapura's answer for a statement with Chow groups and cohomology).

As jvp remarks, there is a refinement of Lemma 1 by Totaro to an equivalence (see jvp's answer for more details).

Let us move on to the case of morphisms to smooth non-rational curves. The existence of a morphism to a curve of genus at least one is a birational property: any such morphism factors through the morphism between the Albanese variety of $X$ and the Jacobian of the curve, and we are done, since the image of $X$ in its Albanese variety is a birational invariant and is all we need to decide the existence of a morphism.

Also in this case, though, the property is not deformation invariant: already in the case of jacobians of genus two curves we can find examples of simple abelian surfaces and of abelian surfaces that are products of elliptic curves (or also just isogenous to products; see, for instance, this MO question).

There is an easy necessary criterion that everyone knows, but no one explicitly mentioned, so I will mention it here: if a variety $X$ admits a (generically smooth) morphism to a curve of genus $g$, then the irregularity of $X$ is at least $g$ (this means that the space of holomorphic one-forms has dimension at least $g$). The proof is obtained simply by pulling back forms from the curve to $X$. This rules out several possibilities, but is quite far from being sufficient - it is an "abelian version" of something that we will see later.

In this case we can state a criterion that might give a feel for what are the difficulties involved.

**Lemma 2.**
*Let $X$ be a smooth projective variety. The following are equivalent*

*
**
*- $X$ admits a non-constant morphism to a curve of genus one;
- the Albanese variety of $X$ is isogenous to a product of an elliptic curve and an abelian variety;
*the Albanese variety contains an elliptic curve.
*

The equivalence of the statements above follows at once from the comment about the morphism factoring through the Albanese variety, as well as well-known statements about morphisms of abelian varieties. We could replace the Albanese variety in Lemma 2 by the Picard group (or the connected component of the identity), using the duality between the Albanese variety and the Jacobian. Thus deciding whether a variety admits a morphism to a curve of genus one reduces to the question of understanding the dimensions of the simple factors of its Albanese variety. This is tricky, but at least it feels like we made some progress, compared to the case of morphisms to curves of genus zero!

On to the case of morphisms to curves of genus at least two. We have already seen that the property is in this case a birational invariant; in fact the property is a deformation invariant (and more!). This follows from a beautiful characterization that only involves topological fundamental groups (over fields of characteristic zero). This characterization starts (in the case of surfaces) with the Theorem of Castelnuovo and de Franchis, later generalized (by Siu, Beauville and Catanese) to work for arbitrary smooth projective varieties. For more details, see the comment by Angelo to my previous answer, as well as the answers of jvp and Donu Arapura. As Donu mentions, it would be interesting to generalize this to varieties over general fields. For instance, what can be said of a variety whose étale fundamental group surjects onto the étale fundamental group of a curve of general type?

Finally, I will conclude this answer by analyzing the case minimal surfaces.

A surface of negative Kodaira dimension (i.e. a ruled surface or $\mathbb{P}^2$, here we do not need the surface to be minimal) admits a morphism to $\mathbb{P}^1$ if and only if it is not isomorphic to $\mathbb{P}^2$. Morphisms to curves of higher genus are also easy to analyze and quickly reduce to the case of morphisms between curves.

A surface of Kodaira dimension zero (i.e. a K3, Enriques, Abelian of bielliptic surface) *not* admitting a morphism to $\mathbb{P}^1$ is either a non-elliptic K3 surface or a simple abelian surface (i.e. an abelian surface that is not isogenous to a product of two elliptic curves). Morphisms to curves of genus at least one are ruled out for K3 surfaces by the irregularity; for abelian varieties every non-constant morphism to a curve factors through a morphism to an elliptic curve (and clearly there are no morphisms to curves of genus at least two).

Every surface of Kodaira dimension one (a properly elliptic surface) admits a morphism to $\mathbb{P}^1$; more precisely, the Stein factorization of the morphism determined by a sufficiently large multiple of the canonical divisor is a canonical morphism to a curve.

For surfaces of Kodaira dimension two, I do not know what else to say, besides what has been already remarked above!

Thus, in conclusion, for minimal surfaces of special type, the only surfaces not admitting a morphism to a curve are $\mathbb{P}^2$, non-elliptic K3 surfaces and simple abelian surfaces (which does not look so bad, after all!). Note that every irreducible component of the moduli space of polarized K3 surfaces contains elliptic surfaces and non-elliptic ones.