Is there a way to construct a compact Riemann Surface X of genus[topological] g when g is given.

Choose $2g+2$ distinct complex numbers $z_i$, and take a double cover of $\mathbb{P}^1$ branched at these points. This is typically written as a plane curve with an affine patch defined by $y^2 = \prod (xz_i)$. See the Wikipedia article (which could use some polish). Topologically, you can picture a genus $g$ surface with the handles lined up in a row, and take a quotient by a 180 degree rotation along the axis of symmetry to get a sphere. 

