Splitting field and Galois group of a polynomial
Let us take a (not so) simple example with $K=\mathbb {Q} $ and $$f(x) =x^4+x^3+x^2+x+1\in K[x] $$ One can prove that if $a$ is a root of this polynomial then $a^5=1$ and further none of $a, a^2,a^3$ equals $1$. Using these we can prove that $a, a^2,a^3,a^4$ are the four distinct roots of the polynomial.
Thus if we use $r_1,r_2,r_3,r_4$ to denote roots of this polynomial with $r_i=a^i$ then we have the following non-trivial relationships among roots $$r_2=r_1^2,r_3=r_1^3,r_4=r_1^4$$ Now let us try some permutations of $S_4$ and see if these are preserved.
The transposition $(1 2)$ does not work as it would lead to a relation $r_1=r_2^2$ ie $a=a^4$ which is not the case. One can check further that none of the transpositions work.
Let us however observe that $r_3=r_4^2, r_1=r_3^2$ and hence the cycle $\tau=(1243)$ does preserve the relationship among roots. And so do its powers. Thus $\tau, \tau^2,\tau^3,\tau^4=\text{id}$ form a group of permutations which preserve the relationship among roots. One can show that none of other remaining 20 permutations in $S_4$ work as desired.
So the Galois group here is essentially a cyclic group of order $4$.
The idea of preserving relationship among roots is frequently used in computation of small Galois groups.
The relationship among roots is also important for finding the splitting field explicitly. For the example above the relations between roots allow us to conclude that the splitting field is $K(a) $ which is of degree $4$ over $K$ and thus the Galois group must be of order $4$.