Transfer function intuition
Normally, in electrical enginnering, we apply the term "transfer function" and "filter" to an operation that belongs in the class we call Linear Time-Invariant systems (LTI).

Sometimes you might read something from someone where they apply either terms to a nonlinear operation.  A 'filter" in statistics usually means a different thing than what EEs mean.  So the use of "filter" is deprecated in this EE context.

Now either a linear or nonlinear operator will take an input signal $x(t)$ or $x[n]$ and will transform it into an output signal $y(t)$ or $y[n]$. The algorithm or rules or math of that operation is what defines what the operator is, linear or nonlinear, time-variant or time-invariant, deterministic or stochastic.

If the operator is LTI, then I would call it either an "LTI system" or a "filter".  For all practical purposes, what defines an operator as linear is

$$\begin{align}
\text{if } \quad y_1(t) &amp;= \operatorname{LTI}\Big\{ x_1(t) \Big\} \\
\text{and } \quad  y_2(t) &amp;= \operatorname{LTI}\Big\{ x_2(t) \Big\} \\
\\
\text{then } \quad  y_1(t)+y_2(t) &amp;= \operatorname{LTI}\Big\{ x_1(t)+x_2(t) \Big\} \\
\end{align}$$

and what defines it as time-invariant is

$$\begin{align}
\text{if } \quad y(t) &amp;= \operatorname{LTI}\Big\{ x(t) \Big\} \\
\\
\text{then } \quad  y(t-\tau) &amp;= \operatorname{LTI}\Big\{ x(t-\tau) \Big\} \quad \text{for any real } \tau \\
\end{align}$$

Now, if your operator satisfies those two conditions, I will call it a "filter".

When a system is LTI, then we can apply all sorts of math on the operator and the signals going in and coming out of the operator.  This includes the Fourier Transform and the Laplace Transform (for discrete-time signals, $x[n]$ and $y[n]$, this would be the Discrete-Time Fourier Transform and the Z Transform, instead).

Probably, the first result we get from Linear System Theory (also called "Signals and Systems" for some textbooks), is that the output $y(t)$ can always be related to the input $x(t)$ by the operation of convolution:

$$\begin{align}
 y(t) &amp;= \int\limits_{-\infty}^{\infty} h(u) x(t-u) \ \mathrm{d}u \\
      &amp;= \int\limits_{-\infty}^{\infty} h(t-u) x(u) \ \mathrm{d}u \\
\end{align}$$

$h(t)$ is the impulse response, and in a sense, fully defines the operation of the filter or LTI system.  I.e. if you know how your LTI system responds to a Dirac impulse as an input, you know how your LTI system will respond to any input.

Then, whether we use the Fourier Transform

$$\begin{align}
 X(f) &amp;= \int\limits_{-\infty}^{\infty} x(t) \, e^{-j 2 \pi f t} \ \mathrm{d}t \end{align}$$

or the (bilateral) Laplace Transform

$$\begin{align}
 X(s) &amp;= \int\limits_{-\infty}^{\infty} x(t) \, e^{-s t} \ \mathrm{d}t \end{align}$$

then the above convolution operation in the time domain becomes a simpler multiplication operation in the frequency domain (or sometimes the "transform domain"):

$$\begin{align}
 Y(f) &amp;= H(f) \, X(f) \\
\\
 Y(s) &amp;= H(s) \, X(s) \\
\end{align}$$

where $X(\cdot)$ and $Y(\cdot)$ and $H(\cdot)$ are all defined the same way from $x(t)$, $y(t)$ and $h(t)$.

The thing that multiplies the (transform of the) input to become the (transform of the) output is the transfer function.  That means $H(f)$ or $H(s)$ transfers the input $X(f)$ or $X(s)$ to the output $Y(f)$ or $Y(s)$.  But that is only in the frequency domain.

In the time domain, the convolution operator (convolving the input $x(t)$ with the impulse response $h(t)$) is what your filter does.

Either the transfer function ($H(f)$ or $H(s)$) or the impulse response ($h(t)$) are sufficient to fully define your LTI system (or filter) from the POV of the input to output relationship.  I.e. two different systems with identical impulse responses $h_1(t) = h_2(t)$ are indistinguishable from each other if both are placed in black boxes.  The same can be said about their transfer functions $H_1(s) = H_2(s)$.  If their transfer functions are identical, from just looking at the inputs and outputs, we cannot tell any difference between the two LTI systems.