Show that $\partial S$ is the set of points of discontinuity of the characteristic function Given $S\subseteq X$, definition of $\partial S$ is the set of points $x\in X$ such that every neighborhood of $x$ contains points of $S$ and $S^c$

I need to show that $\partial S$ is the set of points of discontinuity of the characteristic function $X_S$ of $S$, where 
$$\chi_S(x)=
\begin{cases} 1 &x\in S\\0 &x\in S^c\end{cases}$$

This question made me think exactly what are points of discontinuity... I know, they're the points where the function is not continuous. I can imagine that a discontinuity will occur in the boundary of the set $X$, because that's when it turns from $1$ to $0$, but how to prove it?
I think that, by definition, a point of discontinuity $x$ would need to have the image $f(x)$ such that every neighborhood of $f(x)$ contains $0$ and $1$. How do I translate that for 'every neighborhood of $x$ contains points of $S$ and $S^c$'? 
Update:
what if I try something like $f^{-1}(\{0\}\cup \{1\}) = f^{-1}(\{0\})\cup f^{-1}(\{1\})$? Maybe it helps, but for now I'm getting it to be equal to $X\cup S^c$, don't think that helps
 A: Let $\chi_S$ be discontinuous at $a$ .
Claim: $a\in \partial S$.
In order to show that $a\in \partial S$ we need to show that every neighbourhood of $a$ contains points of both $S$ and $S^c$.
Since  $\lambda_S$ be discontinuous at $a$ so there exists $\epsilon_0>0$ such that $\forall \delta>0$; $\chi_S(a-\delta,a+\delta)\nsubseteq (\chi_S(a)-\epsilon_0,\chi_S(a)+\epsilon_0)$.
CASE I:$a\in S\implies (\chi_S(a)-\epsilon_0,\chi_S(a)+\epsilon_0)=(1-\epsilon_0,1+\epsilon_0)$.
Since $a\in (a-\delta,a+\delta)\implies 1\in \chi_S(a-\delta,a+\delta)$.
Again since $\chi_S(a-\delta,a+\delta)\nsubseteq (\chi_S(a)-\epsilon_0,\chi_S(a)+\epsilon_0)$ and $\chi_S=0\text{or} 1$,hence $\chi_S(a-\delta,a+\delta)=\{0,1\}$.
So $(a-\delta,a+\delta)$ contains points of both $S$ and $S^c$ which holds $\forall \delta>0$.Hence $a\in \partial S$.
CASE II: $a\in S^c$. Proceed similarly..
Conversely; let $\chi _S$ be continuous at $a\in \partial S\implies S$ is clo-open $\implies \bar S=S^\circ=S\implies \partial S=\bar S\setminus S^\circ=\emptyset$ which is false as $a\in \partial S$
A: If $x\in\partial S\cap S$, then $f(x)=1$, Assuming that the function is continuous at $x$, then one has some open set $G$ which containing $x$ such that $|f(u)-1|<1/2$ for all $u\in G$. As you have suggested, $G$ contains some $v\in X-S$, so $1=|f(v)-1|<1/2$, a contradiction. That $x\in\partial S\cap(X-S)$ is treated similarly.
A: A function $f:X \rightarrow Y$ is continuous at $a \in X$, iff for every neighbourhood $O$ of $f(a)$ in $Y$, $f^{-1}[O]$ is a neighbourhood of $a$ in $X$.
Now apply this to $f = \chi_S$ and $Y = \{0,1\}$ in the discrete topology.
Then $\chi_S$ is continuous at $x \in S$ iff $(\chi_S)^{-1}[\{1\}] = S$ is a neighbourhood of $x$ (because $\chi_S(x) = 1$ iff $x \in S$, and we apply the above to the singleton neighbourhood $\{1\}$ which is open), so iff $x \in \operatorname{Int}(S)$. The same holds for the complement of $S$, using $\{0\}$ instead, so $\chi_S$ is continuous at $x \notin S$ iff $X \setminus S$ is a neighbourhood of $x$, i.e. iff $x \in \operatorname{Int}(X \setminus S)$.
As $X = \operatorname{Int}(A) \cup \partial S \cup \operatorname{Int}(X \setminus S)$, and this union is disjoint (for any $S$) we see that $x$ is not a continuity point iff $x \in \partial S$ (Any continuity point lies in $S$, hence its interior, or in its complement and then in the interior of that complement).
