Complex structure of branched cover from covering space 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$?
 A: Let's fix some notation.  Let $T$ be our torus and let $p:S\to T$ be the branched covering map.  Let $B\subset T$ be the set of branch points.  So, as you say, $p$ restricts to a local homeomorphism $S\setminus p^{-1}(B)\to T\setminus B$ and this gives a complex structure on $S\setminus p^{-1}(B)$.  Moreover, we know that each point of $p^{-1}(B)$ has a coordinate chart (not necessarily a holomorphic one) on which $p$ becomes the map $z\mapsto z^2$ at the origin.
Now let $b\in B$ and let $c$ be the preimage of $b$ in $T$.  Pick a holomorphic coordinate disk $D$ around $b$.  Then $p$ restricts to a connected 2-sheeted cover $p^{-1}(D\setminus\{b\})\to D\setminus \{b\}$.  But we know what the holomorphic connected double cover of a punctured disk is: it's just another punctured disk, with the map $z\mapsto z^2$ (here we're using the fact that the complex structure on $p^{-1}(D\setminus\{b\})$ is the unique one that makes $p$ holomorphic).  So $p^{-1}(D\setminus\{b\})$ is biholomorphic to a punctured disk, with $p$ becoming the map $z\mapsto z^2$ under this biholomorphism.  Thinking of this biholomorphism as a coordinate chart on $S$, we can then extend it over the whole disk by mapping $0$ to $c$, and $p$ remains holomorphic at $c$.
In this way, we obtain a complex structure on all of $S$ which makes $p$ holomorphic.  More generally, a similar construction shows that if $p:S\to T$ is a branched cover of topological surfaces (meaning each point of $T$ has a disk neighborhood whose inverse image is a disjoint union of disks with $p$ given by $z\mapsto z^n$ for some $n$ on each one), then for any complex structure on $T$ there is a unique complex structure on $S$ which makes $p$ holomorphic.  Namely, first lift the complex structure everywhere except the branch points. Then, looking at a deleted neighborhood of each branch point you can use the fact that the holomorphic $n$-sheeted cover of a punctured disk is again a punctured disk to extend the complex structure to the branch point.
A: 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.
