Prove that $\overline S$ is not path connected, where $S=\{x\times \sin(\frac1x):x\in(0,1]\}$ 
The goal is to show that $\overline S$ is not path connected, where $S=\{x\times \sin(\frac{1}{x}):x\in(0,1]\}$.

Proof.
Suppose there is path $f:[a,c]\to\overline S$ beginning at the origin and ending at a point of $S$. 
The set of those $t$ for which $f(t)\in0\times[-1,1]$ is closed, so it has a largest element $b$. 
Then $f:[b,c]\to\overline S$ is a path that maps $b$ into the vertical interval $0\times [-1,1]$ and maps the other points of $[b,c]$ to points of $S$.
Replace $[b,c]$ by $[0,1]$ for convenience; let $f(t)=(x(t),y(t)).$ 
Then $x(0)=0,$ while $x(t)>0$ and $y(t)=\sin(1/x(t))$ for $t>0$. 
We show there is a sequence of points $t_n\to0$ such that $y(t_n)=(-1)^n.$ Then the sequence $y(t_n)$ diverges, contradicting the continuity of $f.$
To find $t_n$ we proceed as follows: Given $n,$ choose $u$ with $0<u<x(1/n)$ such that $\sin(1/u)=(-1)^n$. Then use the intermediate value theorem to find $t_n$ with $0<t_n<1/n$ such that $x(t_n)=u.$




*

*I don't understand how this function $f(t)=(x(t),y(t))$ is defined. $f(0)=(x(0),y(0))=(0,?)$

*About the sequence of points $t_n$, I don't understand the process of construction.
Given $n\in\mathbb N,$ let $u\in(0,x/n)\dots$ Is  $x$  is a function right?
Using IVT, why the interval for $t_n$ is $(0,1/n)$?

Let $H=\{(x, sin(1/x)) \;:\; x\in(0,1)\}$ and $T = \{0\} \times [-1, 1]$. Let
$\tag 1 S = H \cup T$
It is easy to show that $S$ is path-connected if and only if $S \cup \{\left(1,sin(1)\right)\}$ is path-connected. This is only mentioned because we modified (ever so slightly) the OP's question to fit the machinery found below.
The space $S$ is not path-connected.
Assume, to get a contradiction that we have a path $\gamma$ in $S$ connecting the point $(0,0)$ to $\left(\frac{1}{2}, sin(\frac{1}{2})\right)$.  The inverse image of $T$ under $\gamma$ is a closed subset of $[0,1]$ and has a maximum value not equal to $1$. By modifying this path, we can define another path 
$\tag 2 \omega: [0,1] \to S$ 
satisfying $\omega(0) \in T$, $\,\omega(1) = \left(\frac{1}{2}, sin(\frac{1}{2})\right)$ and $\omega\left( (0,1] \right) \cap T = \emptyset$.
But this path can also be regarded as connecting the two points inside the space 
$\tag 3 G = H \cup \{ (0, \pi_y(\omega(0)) \}$ with $\pi_y$ the projection onto the $y\text{-axis}$
The concluding remark found here means that this is impossible.
