Let $C$ be a compact Riemann surface. Let $x_1,\ldots,x_n$ be $n$ distinct points on it. For $i=1,\ldots,n$, let $m_i$ be a positive integer considered as a `ramification order' at $x_i$.
Questions:
(1) are there conditions (and if yes, what are they) in order that there exists a ramified covering $\tilde C\rightarrow C$ with associated ramification divisor $\sum_{i=1}^n m_i x_i$?
(2) assuming that these conditions are satisfied, how is constructed such a covering $\tilde C\rightarrow C$? And what can be said about the space of such ramified coverings?
I'm aware that it must be well known, but I'm not able to find where this is treated in the literature on Riemann surfaces.
Any help would be welcome.
Thanks in advance.