Let $E$ be a $\mathbb R$-Banach space, $(T(t))_{t\ge0}$ be a semigroup on $E$ and $(\mathcal D(A),A)$ denote the generator of $(T(t))_{t\ge0}$.
If $F$ is a closed subspace of $E$ and $T(t)F\subseteq F$ for all $t\ge0$, we may consider $(T(t))_{t\ge0}$ as a semigroup on $F$. If $(\mathcal D(B),B)$ denotes the generator of that semigroup, how are $(\mathcal D(A),A)$ and $(\mathcal D(B),B)$ related?
I assume you are asking about a $C_0$ semigroup $T : E\rightarrow E$. The generator $A : \mathcal{D}(A)\subseteq E \rightarrow E$ is the unique linear operator $A$ defined by $$ Ax=\lim_{t\downarrow 0}\frac{1}{t}(T(t)-I)x $$ on the domain $\mathcal{D}(A)$ consisting of all $x$ for which the above limit exists. $A$ is a closed, densely-defined linear operator on $\mathcal{D}(A)\subseteq E$.
If $T(t)F\subseteq F$ for some closed subspace $F$ of $E$, then the restriction of $T$ to $F$ is also a $C_0$ semigroup, and the generator $B$ of this restriction must be the restriction of $A$ to $\mathcal{D}(B) \subseteq\mathcal{D}(A)$, where $\mathcal{D}(B)$ consists of all $b\in F$ for which the following limit exists: $$Bb=\lim_{t\downarrow 0}\frac{1}{t}(T(t)-I)b.$$ That is, $B$ is the restriction of $A$ to $\mathcal{D}(B)$, and $A : \mathcal{D}(B)\subseteq F\rightarrow F$.