Suppose that $T\in B(H)$. As we know $T^{-1}$ is bounded if and only if $T$ is bijective. Also, $T^{-1}T=TT^{-1}=I$. In the other word, $T^{-1}:\mathcal{H}\to \mathcal{H}$ such that $T^{-1}T\xi=\xi$ for every $\xi\in \mathcal{H}$.
How is the inverse (unbounded inverse) of $T$ defined if $T$ is not boundedly invertible?
It's defined on a dense subset. The typical example is $T $ given by $Te_n=\frac1n\,e_n $. Then $T^{-1}e_n=ne_n $, and so $T^{-1} $ is only defined on a dense subset of $H $.