Let $U_n = \{z: n \geq Re(z) \geq \frac{1}{n}, |Im(z)| \leq n\}$, $V_n = \{z: -n \leq Re(z) \leq \frac{-1}{n}, |Im(z)| \leq n\}$. Let $f_n: U_n \cup V_n \cup [-in, in] \to \mathbb{C}$ be defined as $f_n(z) = 1$ for $z \in U_n$, $f_n(z) = 0$ for $z \in [-in, in]$, $f_n(z) = -1$ for $z \in V_n$. $f_n$ is holomorpic, and $K_n = U_n \cup V_n \cup [-in, in]$ is compact subset of a complex plane, and $\bar{\mathbb{C}} - K_n$ has only one component, so if we take $S = \{\infty\}$, there's a rational function $p_n$ that only has poles in $S$, such that $\sup_{z \in K_n} |f_n(z) - p_n(z)| < \frac{1}{n}$. As $p_n$ has only pole at infinity, it's a polynomial. It's easy to see that sequence $p_n$ satisfy the requirements, because each $z \in \mathbb{C}$ is in $K_n$ for all $n$ starting from some $n_0$.
It depends on what is meant by "polynomial".
If only $\sum c_n z^n$, then every function that is uniformly approximable by polynomials must be holomorphic on the interior of $J$.
Although that condition is trivially satisfied if $J$ has empty interior, that doesn't mean that for such $J$ every continuous function is the uniform limit of polynomials. For example the unit circle has empty interior, but a sequence of polynomials converging uniformly on the unit circle converges uniformly on the closed unit disk by the maximum principle, and thus if $f$ is a uniform limit of polynomials on the unit circle, then there is a holomorphic function $h$ on the unit disk that extends continuously to the unit circle, with boundary values $f$. In particular, we have
$$\int_{\lvert z\rvert = 1} f(z)\cdot z^n \,dz = 0\tag{1}$$
for all $n \geqslant 0$. (And, in this case, that condition is sufficient.)
That phenomenon generalises, if $J$ disconnects the plane, that is, if $\mathbb{C}\setminus J$ has at least two connected components, then the bounded components of the complement of $J$ impose restrictive conditions on the continuous functions that are uniform limits of polynomials similar to $(1)$.
Mergelyan's theorem asserts the converse, if $J$ is a compact subset of $\mathbb{C}$ with empty interior such that $\mathbb{C}\setminus J$ is connected, then every continuous function on $J$ can be uniformly approximated by polynomials (in $z$ only).
If "polynomial" means polynomial in $z$ and $\overline{z}$, or equivalently polynomial in $\operatorname{Re} z$ and $\operatorname{Im} z$, then the Weierstraß approximation theorem holds for all compact $J$.
Best Answer
You can begin by considering the case where $K=\{z\in \Bbb C:|z|=1\}$ and $z_0=0$, which is simpler but uses the same ideas. These ideas are described here.