Any affine variety corresponds to an open subset of projective space? Let $Y$ be an affine variety of $\mathbb{A}^n$. I read in a previous question that then $Y$ can be identified with an open subset of projective space $\mathbb{P}^n$. 
I don't know why this is true as it is not stated in my notes. 
However, in the red book it mentions that projective space can be covered by $(n+1)$ subsets $U_0, \dots U_n$ where each $U_i$ is a set of homogeneous coordinates and each $U_i$ is naturally isomorphic to $k^n$


*

*Why can we cover projective space by such subsets ? It makes some intuitive sense as adding points of infinity would make the space compact. However, it would be nice to see some concrete reasoning for this. 

*Is my first statement related to this covering of $\mathbb{P}^n$ and how?  

Yes, $\mathbf A^n$ can be considered an open subspace of $\mathbf P^n$, for instance with the correspondence:
\begin{align*}
\mathbf A^n&\longrightarrow\mathbf P^n\\
(x_1,\dots,x_n)&\longmapsto (1:x_1:\dots:x_n)
\end{align*}
The inverse correspondence is defined on $\mathbf P^n\smallsetminus H_0$, where $H_0$ is the hyperplane $x_0=0$:
\begin{align*}
\mathbf P^n\smallsetminus H_0&\longrightarrow\mathbf A^n\\
 (x_0:x_1:\dots:x_n)&\longmapsto\Bigl(\frac{x_1}{x_0},\dots,\frac{x_n}{x_0}\Bigr)
\end{align*}
Actually, one can show the complement of any hyperplane in $\mathbf P^n$ is isomorphic to $\mathbf A^n$.
