Every elliptic curve $E/\mathbf Q$ is modular, in the sense that there exists a nonconstant morphism $X\_0(N) \to E$ for some $N$. 


It is tempting to extend this definition in a naïve way to an arbitrary projective curve over $\mathbf Q$; if $Y$ is such a curve, we might say that $Y$ is modular if there exists a nonconstant morphism $X\_0(N) \to Y$ for some $N$. A necessary condition for $Y$ to be modular is that it should have at least one rational point, since $X\_0(N)$ always has a rational point. For an elliptic curve, this condition is satisfied by definition. 


There are certainly a great deal of curves which are modular in this sense. But is there an example of a curve (with a rational point) which is *not* modular? 



Is there an algebraic curve over Q which is not modular?
One expects that the majority of algebraic curves over number fields having genus $> 1$ should not be modular in this sense.


For instance, take a sufficiently general genus 2 curve $C$ over $\mathbf{Q}$. Then its $\ell$-adic $H^1$ (which is just the $\ell$-adic Tate module of its Jacobian) will be a 4-dimensional Galois representation whose image lands inside $\mathrm{GSp}\_4(\mathbf{Z}\_\ell)$. If $C$ is sufficiently generic, then the image of this Galois representation should be the whole of $\mathrm{GSp}\_4(\mathbf{Z}\_\ell)$ for all but finitely many $\ell$; in particular, it will be absolutely irreducible. (I don't know if this is known, but certainly one expects it to be the case.) On the other hand, if $C$ admits a non-constant map from $X\_0(N)$, then the its $H^1$ would have to be a quotient of the $H^1$ of $X\_0(N)$, and this can be calculated in terms of modular forms; in particular all its absolutely irreducible subquotients have dimension 2. So most genus 2 curves $C$ will not be modular in your sense, and if you get one that is, you should regard it as a rather unlikely coincidence.


(A more high-powered interpretation of this is that $H^1(C)$ should be the Galois representation attached to a degree 2 Siegel modular form. In some very special cases this Siegel modular form will be endoscopic, i.e. describable in terms of lifts from elliptic modular forms, but most Siegel mod forms will not be endoscopic and thus will not have anything to do with $X\_0(N)$ for any $N$.)


If you're willing to relax your definition of "modular", though, you can get many more possibilities. There's a very striking result of Belyi stating that any algebraic curve defined over a number field can be obtained as the quotient of the upper half-plane by some subgroup of $PSL(2, \mathbf{Z})$, although the corresponding group will usually not be a congruence subgroup.


