We build a branched cover of a surface of genus $g$ over a torus. To do this, choose $2g-2$ points on the torus, and match them in pairs, and join them with arcs, so that the arcs are all disjoint. Cut along these arcs.
Now take a second copy of the torus, with exactly the same construction of cutting along arcs. Now glue the cut arcs in matching pairs between the two copies of the torus. It is clear that what we get is a closed surface, and we had genus $2$ to begin with (two tori), gluing the first pair of slits connects the two tori, and then for each of the other $g-2$ pairs of slits that we glue we get an extra $1$ for genus, giving genus $g$ in total.
Now we call the $2g-2$ the branch values, and the preimage of a branch value a branch point.
My question is by local homeomorphism, we can lift a complex structure to the surface of genus $g$ minus $2g-2$ branch points and we have holomorphic map from it, but how do we extend the complex structure (and holomorphic map) to the whole surface of genus $g$?
Each branch point in the cover has a neighborhood that, when removed, is holomorphically equivalent to the unit disc punctured by removing its center. The missing point at the center is a "removable singularity", which means that there is a unique complex structure on the open disc (including the point) which extends the complex structure on the punctured disc.