In any Hilbert space \(H\), every closed subspace \(M\) therein is complemented, i.e. there exists a closed subspace \(N\) with \(M \oplus N \cong H\). One possible choice for \(N\) is always the orthogonal complement \(N := M^\perp\).
If we consider Banach spaces instead, then the situation changes. For example, it is `well known’ that the closed subspace \(c_0\) of null sequences in the Banach space \(\ell^\infty\) of all bounded sequences does not admit a complement.
Interestingly, something that I learned just now when writing this blog post and googling some stuff for it, Hilbert spaces are actually characterized by this property: Lindenstrauß and Tzafriri proved that a Banach space is isomorphic to a Hilbert space provided every closed subspace is complemented (On the complemented subspaces problem, Isreal Journal of Mathematics, Vol. 9, No.2, pp. 263-269).
An example of a Banach space with an uncomplemented closed subspace where I still can’t wrap my head around it is the following recent one by Anna Pelczar-Barwacz (arXiv:2309.15261): There exists a reflexive Banach space \(X\) with a Schauder basis \((e_i)_{i=1}^\infty\) such that the mapping carrying each basis vector \(e_i\) to \(e_{2i}\) extends to an isometry between \(X\) and \(Y := \overline{\mathrm{span}}\{e_{2i}: i \in \mathbb{N}\}\) with \(Y\) not complemented in \(X\). My head still keeps telling me that \(\overline{\mathrm{span}}\{e_{2i-1}: i \in \mathbb{N}\}\) should be a closed complement for \(Y\), but this is just not true (it follows from this that the Schauder basis \((e_i)_{i=1}^\infty\) is not unconditional).