Let $X$ be a (smooth) variety, and let $Y$ be a subvariety (or closed subscheme) of $X$. We also have an ample line bundle $L$ on $X$, and suppose that $\dim H^0(L)=n$. I want to focus on the cohomology group $H^0(I_Y \otimes L)$, where $I_Y$ is the ideal sheaf of $Y$ in $X$, and in particular on its dimension.
I know that $H^0(I_Y \otimes L)$ is the vector space of all global sections of $L$ which vanish on $Y$; so, if $\dim H^0(I_Y \otimes L)=n$, then all global sections of $L$ vanish on $Y$. This means that the subvariety $Y$ is contained in the base locus of $L$ (or maybe is it exactly the base locus?).
The question is: what happens if $\dim H^0(I_Y \otimes L)<n$ ? How can we describe $Y$ geometrically if, for example, the dimension is $n-1$ ? Does $Y$ have some restriction or constrains, like in the case of dimension $n$ ?
Thanks for the help.
Edit: correction in the assumptions (see first comment).