Let $X$ be a smooth irreducible curve of finite type $C$ over a separably closed field $k$. For such curves is known that they always have a smooth compactification, that is there exist a smooth projective curve $\overline{X}$ over $k$ which contains $X$ as *open immersion $X \hookrightarrow \overline{X} $.
Due to wikipedia or this discussion roughly the construction works as follows: Assume we can embed our $C$ as locally closed immersion in $\mathbb{P}^{n}$.
(How to manage it? If $C= Spec(R)$ is affine, then since it have finite type we get a closed immersion $C \hookrightarrow_c \mathbb{A}^{n}$ induced by quotient $k[x_1,..., x_{n}] \to R$ and clearly there exist open immersion $\mathbb{A}^{n} \hookrightarrow_o \mathbb{P}^{n}$. If $C$ is not affine then we decompose $C= \bigcup V_i$ in affine open subschemes $V_i = Spec(R_i)$ where these are by finite type assumption given as closed immersions $V_i \hookrightarrow \mathbb{A}^{n_i}$ via qoutients $k[x_1,..., x_{n_i}] \to R_i$. I think we can assume that the number of $V_i$ is finite and therefore chose $n:=n_i$ to be independent of $i$. Then we could somehow arrange the $\mathbb{A}^{n_i}$ to be the affine cover of $\mathbb{P}^{n}$ and argue as before module some technical gaps; optimizations and advices always welcome. nevertheless assume for now $C$ is locally closed in $\mathbb{P}^{n}$)
Next we take Zariski closure $\overline{C}$ of $C$ in $\mathbb{P}^{n}$. If $\overline{C}$ is not smooth, then we can resolve the singularities, but this step is not important for my question.
Question: The aspect which I haven't understood right now is why is $C$ open in $\overline{C}$. Clearly it is dense by construction but I not see any reason why it should be open.
Again, let $\bigcup_i U_i$ be a affine open cover of $\mathbb{P}^{n}$ such that $V_i = C \cap U_i \hookrightarrow_c U_i$ are closed immersions. I want to show that $V_i = U_i \cap C \hookrightarrow U_i \cap \overline{C}$ is an open immersion but don't know how to manage that.
This is immediate from the fact that $C$ is locally closed in $\mathbb{P}^n$. Indeed, let $X$ be any topological space, and let $Y \subseteq X$ be a subset. Then $Y$ is locally closed if and only if $Y$ is open in its closure $\overline{Y}$ (with the subspace topology).
Indeed, by definition, a locally closed subset is the intersection of an open subset and a closed subset. If $Y$ is locally closed, then there exist open $U \subseteq X$ and closed $Z \subseteq X$ such that $Y = U \cap Z$; then we also have $Y = U \cap \overline{Y}$ by the definition of closure. Conversely, if $Y$ is open in $\overline{Y}$, then by the definition of the subspace topology, there is an open set $U \subseteq X$ such that $U \cap \overline{Y} = Y$, so $U$ is locally closed in $X$.