RC high pass filter differential equation
In an RC high-pass filter, the output is taken across the resistor instead of the capacitor. Otherwise, if the output was taken across the capacitor, the RC high-pass filter would start to work as an RC low-pass filter.
An example RC high-pass filter circuit is given below:

The basic idea of using an RC high-pass filter is to filter out the input signal’s low frequency components and let the high frequency components to pass through the succeeding stages of a network.
Actually, this filtering operation depends heavily on the capacitor’s properties for varying frequencies. The formula of a capacitor’s capacitive reactance which represents its resistive nature for varying signal frequencies is given below:
$$X_C{(j\omega)} = \frac{1}{j\omega{C}} \Omega$$
As it can be seen, the formula results in a complex value. According to the formula above; if the frequency $f$ of the signal which is passing through the capacitor decreases, so do the angular frequency $\omega$ because of the formula $\omega = 2\pi{f}$, the magnitude of the capacitive reactance increases. Therefore, basically, the signal which is passing through the capacitor is attenuated.
So, in the light of these knowledge, let’s analyse the given circuit.
If the Kirchhoff’s voltage law is applied on the circuit, we get;
$$-V(t) + V_C{(t)} + V_R{(t)} = 0$$
$$-V(t) + {\frac{1}{C}\int_{t_0}^{t} i(t) \, dt} + V_C{(t_0)} + V_O{(t)} = 0$$
If the assignments $V(t) = x(t)$ and $V_O{(t)} = y(t)$ are done in order to involve classical input and output notations as in the systems, the equation becomes;
$$-x(t) + {\frac{1}{RC}\int_{t_0}^{t} y(t) \, dt} + y(t) = 0$$
$${\frac{1}{RC}\int_{t_0}^{t} y(t) \, dt} + y(t) = x(t)$$
$${\int_{t_0}^{t} y(t) \, dt} + RCy(t) = RCx(t)$$
If the time derivatives of the both sides of the last equation is taken, the resultant equation becomes;
$$y(t) + RC\frac{dy(t)}{dt} = RC\frac{dx(t)}{dt}$$
According to this differential equation which describes the input-output relationship of the given RC high-pass filter, the frequency domain analyses can be done.
The same process can be followed when analysing an RC low-pass filter too.