To have a good notion of hyperplane I restrict myself to a $d$-dimensional vector space with $d<\infty$.
Suppose we have an affine hyperplane $H$ and another affine subspace $A$ of dimension $m$.
If $m=d$ we have $A=V$ so $\dim A\cap H = \dim H = d-1 =m-1$.
If $A$ is contained in $H$ then $\dim A \cap H = \dim A = m$.
If $A$ is parallel to a subspace of $H$ and they don’t share a common point, then $A\cap H=\emptyset$ and the dimension of the intersection is not defined.
Otherwise they do intersect and it suffices to restrict to the case that both $A$ and $H$ are linear subspaces (not affine anymore). We find $A+H=V$, since otherwise $A$ would be contained in $H$. Hence the dimension formula yields
$$\begin{align*}
d &= \dim V\\
&= \dim (A + H)\\
&= \dim A + \dim H - \dim (A\cap H)\\
&= d-1 + m - \dim A\cap H
\end{align*}$$
Thus we get $\dim (A \cap H) = m-1$.