Let $X$ be a variety contained in $\mathbb{P}^N$ and let $Y$ be a smooth hyperplane section of $X$. I have read in page 54 of Voisin's book "Hodge theory and complex algebraic geometry II" the following:

there exists a Lefschetz pencil of hyperplane sections of $X$ of which $Y$ is one member.

I would like to know why this is true. Any reference for it will be also very helpful. Thank you very much :)!