In this question, I denote $\mathbb{P}^n$ for the standard $n$-dimensional projective space over $\mathbb{C}$. Also, with a variety I always mean a Zariski closed subset.
I am currently following an introductory course in algebraic geometry (I am 5 chapters in 'An invitation to algebraic geometry') and stumbled on the following problem:
Let $g \in \mathbb{C}[x_0 , ... , x_n]$ be a homogeneous polynomial of with degree at least 1. Suppose $Y \subset \mathbb{P}^n$ is a projective algebraic variety such that $Y \cap \mathbb{V}(g) = \emptyset$. Prove that $Y$ is affine.
I'm not sure I have a good understanding of the concept of a projective variety being affine. In my course we defined $U_i$ to be the set of $[x_0 : ... : x_n] \in \mathbb{P}^n$ where $x_i \neq 0$ and $\psi_i : U_i \to \mathbb{A}^n : [x_0 : ... : x_n] \mapsto [\frac{x_0}{x_i} : ... : \frac{x_n}{x_i}]$, which is a homeomorphism with respect to the Zariski topologies. Therefore we can "identify $\mathbb{A}^n$ as $U_i$, being a subset of $\mathbb{P}^n$", and we can thus "see every affine algebraic variety $V \subset \mathbb{A}^n$ as a subset of $\mathbb{P}^n$". What's meant by this (according to me) is that we can identify an affine algebraic variety $V \subset \mathbb{A}^n$ with $\psi_i^{-1}(V)$ as a subset of $\mathbb{P}^n$. Then we call a projective variety $W \subset \mathbb{P}^n$ affine if we can find an $i$ and an affine variety $V \subset \mathbb{A}^n$ such that $W = \psi_i^{-1}(V)$ (or that's how I interpreted this).
I can prove that this is equivalent to $W \subset U_i$ for some $i$. But $U_i = \mathbb{P}^n \setminus \mathbb{V}(x_i)$ is just the whole projective space minus a hypersurface, so shouldn't every projective variety $W$ for which we can find a hypersurface $H$ such that $W \subset \mathbb{P}^n \setminus H$ be called affine? Such $W$ is definetly isomorphic to an affine variety. And what about projective varieties $W \subset \mathbb{P}^n \setminus \mathbb{V}(g)$ for some homogeneous $g \in \mathbb{C}[x_0 , ... , x_n]$, like in the above problem? (Maybe we could differ the case where $g$ is irreducible from the case where it is not?)