TITLE: Relationship between Hilbert schemes and deformation spaces
QUESTION [8 upvotes]: Hi, I'm just starting to learn about deformation theory (via Hartshorne's Deformation theory, as well as Fantechi's section of FGA explained), and I feel like I'm confused about fundamental concepts. So please indulge me even if the question is well-known, or trivial.
So suppose we have a projective variety $Y \subseteq \mathbb{P}_k^n$. Then we can consider two natural objects associated to it, namely, the Hilbert scheme, which parametrizes all the objects with the same Hilbert polynomial as $Y$, and the (versal?) deformation space, which represents the deformation functor $F: (Art)_k \to (Sets)$.
My question is, is there a relationship between these two spaces? My hunch is that the Hilbert scheme is included in some way (perhaps via immersion, although that sounds kind of strong) to the deformation space - I guess this means that any deformation over an Artin ring doesn't change the Hilbert polynomial - but I can't formulate any coherent and believable conjecture right now. (If the question doesn't make sense, could you answer the right question that most closely approximates it?)
Thank you for reading.

REPLY [10 votes]: Here's one interpretation if you're content with thinking about the tangent spaces of these functors:
Suppose that $Y$ is a smooth (you can get away with less here) subvariety of $\mathbb{P}^n$.  You have the short exact sequence 
$0 \rightarrow T_Y \rightarrow i^*T_{\mathbb{P}^n} \rightarrow N_{Y/\mathbb{P}^n} \rightarrow 0.$
Infinitesimal embedded deformations of $Y$ inside $\mathbb{P}^n$ are given by global sections $H^0(Y, N_{Y/\mathbb{P}^n})$.  Infinitesimal deformations of $Y$ abstractly are parameterized by $H^1(Y, T_Y)$.  There is a forgetful map of functors sending an embedded deformation to the abstract deformation (that is, forget the embedding).  Once you know that those functors are (pro)representable (or even if you don't), then the differential map for the corresponding morphism of spaces/functors is given by the connecting homomorphism in the long exact sequence of cohomology (from the above short exact sequence): 
$\delta: H^0(Y, N_{Y/\mathbb{P}^n}) \rightarrow H^1(Y, T_Y)$