$\newcommand{\NN}{{\mathbb{N}}}\newcommand{\CC}{{\mathbb{C}}}\newcommand{\RR}{{\mathbb{R}}}\newcommand{\ra}{\rightarrow}\newcommand{\ds}{\displaystyle}$
The answer might be surprising: If the characteristic polynomial $p(t)$ has at least one real zero then the set $f^{-1}(p)$
is connected. If $p(t)$ has no real zeros than it consists of three connected components.
The starting point of my solution is the observation that the characteristic polynomial $p(t)= t^4 + a_3 t^3 + a_2 t^2 + a_1 t + a_0$
of $A$ in $f^{-1}(p)$,
\begin{align*}
A = \begin{pmatrix}
0 & -b_1 & 0 & -c_1 \\
1 & -b_2 & 0 & -c_2 \\
0 & -b_3 & 0 & -c_3 \\
0 & -b_4 & 1 & -c_4 \\
\end{pmatrix},
\end{align*}
is calculated as
\begin{equation}\tag{1}\label{eq1}
p(t)= (t^2+b_2t+b_1)(t^2+c_4t+c_3)-(b_4t+b_3)(c_2t+c_1).
\end{equation}
It is tempting to vary $b_4,b_3,c_2,c_1$ as parameters and determine $b_2,b_1,c_4,c_3$ from a real factorisation of the polynomial
$p(t)+(b_4t+b_3)(c_2t+c_1)$. While such a factorisation always exists (not unique in general),
it does not depend continuously upon the parameters, that is if we
vary $b_4,b_3,c_2,c_1$ continuously on some path in $\mathbb R^4$, then it might be impossible to choose corresponding
factorisations in a continuous way. This can be seen using the complex roots of $(t^2+b_2t+b_1)(t^2+c_4t+c_3)$, but it is not the question here.
Instead, I will use $b_1,b_2,b_3,b_4$ as parameters and determine $c_1,c_2,c_3,c_4$ by solving the linear equation (\ref{eq1}).
This leads to a system of linear equations
\begin{equation}\tag{2}\label{eq2}
\begin{array}{rcrcrcrcl}
&&&&&&c_4&=&a_3-b_2\\
&-&b_4\,c_2&+&c_3&-&b_2\,c_4&=&a_2-b_1\\
-b_4c_1&-&b_3\,c_2&+&b_2\,c_3&+&b_1\,c_4&=&a_1\\
-b_3\,c_1&&&+&b_1\,c_3&&&=&a_0.
\end{array}
\end{equation}
Its determinant is $d(b_1,b_2,b_3,b_4)=b_3^2-b_2b_3b_4+b_1b_4^2$.
If $b_4\neq0$ then it vanishes if and only if the two polynomials
$t^2+b_2t+b_1$ and $b_4t+b_3$ have a common zero, namely $t=-b_3/b_4$.
Whenever $d(b_1,b_2,b_3,b_4)\neq0$, the parameters $b_j$ determine $c_1,c_2,c_3,c_4$ uniquely. If the parameters
vary continuously along some path in $\RR^4$ on which $d$ does not vanish, then so do the corresponding $c_j$.
Given a matrix $A$ in $f^{-1}(p)$, we will now try to reduce it within $f^{-1}(p)$ to the block diagonal form indicated by MyCindy2012.
During the proof, it will also become clear that all such block diagonal matrices can be connected by paths within $f^{-1}(p)$.
We have to consider several cases. The trivial ones that $b_3=b_4=0$ or $c_1=c_2=0$ are excluded in the sequel because
$c_1,c_2$ or $b_3,b_4$, respectively, can be reduced to zero without changing anything else.
If $b_4=0$ and $b_3\neq0$, then $d(b_1,b_2,b_3,b_4)\neq0$ whatever $b_1,b_2$ and hence they can be chosen arbitrarily and, by
(\ref{eq2}), $c_1,c_2,c_3,c_4$ are uniquely determined. Therefore we can reduce $b_1,b_2$ to those values correponding to some
real factorisation $p(t)= (t^2+b_2t+b_1)(t^2+c_4t+c_3)$ of $p$. By the uniqueness, we must then have $c_1=c_2=0$ and
we reach the block diagonal form.
Observe that in this case, we can reach {\em any} real factorisation of $p(t)$. Trivially the present case can be reached
from any real factorisation of $p(t)$ ad therefore they can all be connected by paths within $f^{-1}(p)$.
In the sequel we assume that $b_4\neq0$ tacitly.
If $d(b_1,b_2,b_3,b_4)=b_3^2-b_2b_3b_4+b_1b_4^2 >0$ then we can first increase $b_1$ to a sufficiently large value, then
reduce $b_2$ to $0$ and finally reduce $b_4$ to 0 without leaving the set $b_3^2-b_2b_3b_4+b_1b_4^2 >0$. Completing these $b_j$
by $c_k$ from system (\ref{eq2}), we obtain a path in the subset of $f^{-1}(p)$ on which $b_3^2-b_2b_3b_4+b_1b_4^2 >0$.
As it leads to case 1, we are done.
If $d(b_1,b_2,b_3,b_4)=0$, then $t^2+b_2t+b_1$ and $b_4t+b_3$ have common zero $z=-b_3/b_4$ and thus a common factor $t-z$.
By (\ref{eq1}), $t-z$ must also be a factor of $p(t)$ and we can divide (\ref{eq1}) by $t-z$ to obtain
\begin{equation}\tag{3}\label{eq3}
q(t)=t^3+d_2t^2+d_1t+d_0=(t+h)(t^2+c_4t+c_3)-g_1t-g_2
\end{equation}
with $d_0,d_1,d_2,g_1,g_2,h$ related to previous coefficients. We write $q=F(c_3,c_4,g_1,g_2,h)$.
We now show that for any given $q$, the set $F^{-1}(q)$ is connected. It is convenient to assume that $d_2=0$. This is not
a loss of generality as replacing $t$ by $t-\frac13d_2$ in (\ref{eq3}) leads to an equivalent situation.
If we denote the zeroes of $t^2+c_4t+c_3$ by $z_1,z_2$ (Attention, .
they might be conjugate complex) then
for $s$, $0\leq s\leq 1$, the product $t^2+sc_4t+s^2c_3=(t-sz_1)(t-sz_2)$ and the product $(t+sh)(t^2+sc_4t+s^2c_3)$
has the zeroes $sh,sz_1,sz_2$. Putting
$$g_1(s)t+g_2(s)=(t+sh)(t^2+sc_4t+s^2c_3)-q(t),$$
we obtain for each $s$ a decomposition (\ref{eq3}) in $F^{-1}(q)$.
Therefore any decomposition (\ref{eq3}), $d_2=0$, can be reduced within $F^{-1}(q)$ to
$q(t)=t\cdot t^2+d_1t+d_0$ by letting $s$ vary from 1 to 0. As a consequence, any two decompositions (\ref{eq3}) are connected
within $F^{-1}(q)$.
For our purpose, we reduce $g_1,g_2$ to 0. In the corresponding problem for our polynomial of degree 4, this means that we can reach
$c_1=c_2=0$ and we are done.
If $d(b_1,b_2,b_3,b_4)=b_3^2-b_2b_3b_4+b_1b_4^2 <0$ and $p$ has at least one real zero, say $t=z$, then we first reduce
$b_1$ to a sufficiently large negative value, $b_2$ to 0 and then reduce $b_3$ to the value $b_3=-z\,b_4$. If $b_1$
is sufficiently negative, we remain in the set $b_3^2-b_2b_3b_4+b_1b_4^2 <0$ and can therefore complete with certain
$c_j$ to elements of $f^{-1}(p)$. Now $p(t)$ and $b_4t+b_3$ have a common zero: $t=z$. By (\ref{eq1}), it must also be a zero
of $t^2+c_4t+c_3$, since it is not a zero of $t^2+b_2t+b_1$. Therefore $t^2+c_4t+c_3$, $b_4t+b_3$ and $p(t)$ can be divided by
$t-z$ and we obtain a problem for a polynomial of degree 3 analogous to the one in case 3. Again, we can reach the block diagonal
form.
If $d(b_1,b_2,b_3,b_4)=b_3^2-b_2b_3b_4+b_1b_4^2 <0$ and $p$ has no real zeroes then we cannot reach a block diagonal
form. In fact, we cannot reach any point in $f^{-1}(p)$ where $d$ vanishes (and hence also no point where $d$ is positive).
To show this, assume that we have decompositions
\begin{equation}
p(t)= (t^2+b_2(s)t+b_1(s))(t^2+c_4(s)t+c_3(s))-(b_4(s)t+b_3(s))(c_2(s)t+c_1(s)).
\end{equation}
with coefficients depending continuously upon $s$, $0\leq s\leq 1$, that $b_3(s)^2-b_2(s)b_3(s)b_4(s)+b_1(s)b_4(s)^2<0$
for $s<1$ whereas $b_3(1)^2-b_2(1)b_3(1)b_4(1)+b_1(1)b_4(1)^2=0$. We cannot have $b_4(1)\neq0$ because then, as shown in
case 3, $p(t)$ has a linear term $t-z$ as a factor contradicting the assumption that it does not have real zeroes.
Therefore $b_4(1)=b_3(1)=0$ and for $s=1,$ we have reached a real factorisation of $p(t)$. Hence the two quadratic factors
have no real roots and therefore negative discriminant, in particular $b_2(1)^2-4b_1(1)<0$.
On the other hand, for $s<1$ we must have $b_4(s)\neq0$ and the polynomial $t^2+b_2(s)t+b_1(s)$ has a negative value
at $t=-b_3(s)/b_4(s)$. Therefore, it has positive discriminant: $b_2(s)^2-4b_1(s)>0$ for $s<1.$ By continuity,
we must have $b_2(1)^2-4b_1(1)\geq0$ and have reached a contradiction.
Observe that is this case, we must also have $c_1^2-b_2c_1c_2+b_1c_2^2<0$, because in (\ref{eq1}), $c_2t+c_1$ might replace
the other linear term $b_4t+b_3$. If $c_1^2-b_2c_1c_2+b_1c_2^2\geq0$ then we can reach a block diagonal decomposition
in $f^{-1}(c)$ -- as shown in case 2 and 3 -- but this is not possible. Similarly, we have
$b_3^2-c_4b_3b_4+c_3b_4^2<0$, $c_1^2-c_4c_1c_2+c_3c_2^2<0$.
We also show that the subset of $f^{-1}(p)$ on which $b_3^2-b_2b_3b_4+b_1b_4^2 <0$ has two connected components.
Clearly, it must have at least two components, because $b_4$ cannot vanish on it.
On the other hand from any starting point, we can first decrease $b_1$ to sufficiently large negative $b_1$ and then reduce
$b_2$ and $b_3$ to 0 and $b_4$ to $1$ or $-1$. The corresponding $c_j$ are again uniquely determined from system (\ref{eq2}).
Therefore the subset of $f^{-1}(p)$ on which $b_3^2-b_2b_3b_4+b_1b_4^2 <0$ has exactly two connected components
in the present case and together with case 2, $f^{-1}(p)$ has exactly 3 connected components in the case
that $p$ has no real zeroes.
Edit: 1. Observe that it is not necessary in this proof that $p(t)$ is squarefree.
2. In the complex domain. $f^{-1}(p)$ is always connected. $p(t)$ has always zeros, factorisations into quadratic factors can be continued as cntinuous functions and elimination of finitely many points of $\mathbb C$ still leaves a connected set.
3. For completeness, here is an example of a continuous family of monic real polynomials of degree 4 for which there does not exist a continuous real factorisation into quadratic factors. We define the polynomials by giving their zeros.
First for $s$ from $1$ downto $0$, the zeros are $\pm1\pm s\,i$, then for
$a$ from $1$ downto $0$, they are $\pm1$ and $\pm s$, finally for
$b$ from $0$ to $1$ they are $\pm1$ and $\pm bi$.
The factorisation must then be (except for ordering) $(t^2+2t+1+s^2)(t^2-2t+1+s^2)$ for $s$ from $1$ downto 0, then $(t^2+(1+a)t+a)(t^2-(1+a)t+a)$ for $a$ from 1 downto 0 and it jumps to $(t^2-1)(t^2+b^2)$ at this point.
It is automatically true that $B$ commutes with any matrix of the form
$$ xI + y B + z B^2. $$ Note that it is not necessary to consider $B^3$ or $B^4,$ as these can be absorbed into the given expression.
The nontrivial theorem is that, when the minimal polynomial agrees with the characteristic polynomial, then the only matrices commuting with $B$ are those polynomial expressions in $B.$ That applies here, the condition is equivalent to this: each eigenvalue occurs in just one Jordan block.
In sum, you are still a little off.
Best Answer
If $x\in \mathbb{R}^4$ must lie in $S$, then it must satisfy $\sum_i a_i x_i = 0$ and $\sum_i b_i x_i = 0$ (lying on both planes). Thus, it must be in the null space of '$A$' you mentioned. The question reduces to finding the null space.
Assuming the rank of $A$ is two (in general, this is the case), its null space has a dimension of 2. Hence, any vector belonging to the null space can be completely defined by two variables. Let us choose $x_3$ and $x_4$ as these 'free' variables. Since $Ax=0$, we have $$ a_1 x_1 + a_2 x_2 = -x_3(a_3) - x_4(a_4)\\ b_1 x_1 + b_2 x_2 = -x_3(b_3) - x_4(b_4) $$ Given values of $x_3$ and $x_4$, one can obtain $x_1$ and $x_2$ from the above equations. To get a basis, one can arbitrarily chose a set of $(x_3,x_4)$ pair. A simple choice is the set $\{(1,0),(0,1)\}$. The $x_1$ and $x_2$ values corresponding to these will fully define the basis vectors.
There can also be cases where the planes are oriented in such a way that the intersection space is one-dimensional or empty. If the planes are co-planar, the intersection space is the plane itself.