We need to show that the center of a group, $$\operatorname{C}(G) = \left\{x \in G \mid axa^{-1} = x\;\;\forall a \in G\right\}\,,$$ contain the identity element, and only the identity element. It's easy to show that the identity element is in ${\operatorname{C}(G).}$
Now suppose (for the sake of contradiction) that we have a non-identity element $\sigma {\in \operatorname{C}(G).}$ To keep things simple for now, suppose $\sigma$ is a cycle $(x_1\;\dotsb\;x_m)$. Recall that (or you should prove that) $$\pi(x_1\;\dotsb\;x_m)\pi^{-1} = (\pi(x_1)\;\dotsb\;\pi(x_m))\,.$$
Knowing this, for any given $\sigma$ do you think you can find a $\pi$ that won't fix $\sigma$ under conjugation? Then can you see how this argument extends to elements of $S_n$ that are not cycles?
If there is a element $i \in \{1,\dotsc,n\}$ such that $x_i$ is not moved by the permutation $\sigma$, then let $\pi = (x_i,x_1)$. Otherwise $(x_1\;\dotsb\;x_m)$ permutes at least three elements, and you may let $\pi = (x_1,x_m)$. Since every permutation of $S_n$ can be written as a product of disjoint cycles, this argument on a single cycle $\sigma$ extends to any permutation in $S_n$.