Suppose, $\lim_{x\to c}f(x) =L$ and $\lim_{x\to c}g(x) =M \space \space (L,M\in \overline{\Bbb{R}})$, then
$$\begin{align}\lim_{x\to c}[f(x) \cdot g(x)]&=
\lim_{x\to c}f(x)\cdot \lim_{x\to c}g(x) = L\cdot M\end{align}$$
Observation:
$\lim_{x\to 0}x \cdot \frac{1}{x} \neq \lim_{x\to 0} x \cdot \lim_{x\to
0}\frac{1}{x} $
Conclusion: If both $\lim_{x\to c}f(x)$ and $\lim_{x\to c}g(x) $ exists then we can apply product rule of limit.
In your question,
$\begin{aligned}\lim_{x\to 0}
x\sin\left(\frac{1}{x}\right)&=\lim_{x\to 0}x\cdot\lim_{x\to 0}\sin\left(\frac{1}{x}\right)\\&=0\cdot \infty\\&=\infty \end{aligned}$
$\lim_{x\to 0}\sin\left(\frac{1}{x}\right)$ doesn't exists.
$\lim_{x\to c} f(x) =L$ iff $\forall (x_n)_{n\in \Bbb{N}}$ with $(x_n)
\to c\implies f(x_n) \to L$
$\lim_{x\to c} f(x) $ doesn't exists if $\exists (x_n), (y_n) $ such that $(x_n) \to c$ and $(y_n) \to c$ but
$\lim f(x_n) \neq \lim f(y_n) $
Now, choose $x_n = \frac{1}{n\pi}$ and $y_n= \frac{2}{(4n+1)\pi}$
Both $(x_n) , (y_n) $ converges to $0$ but
$ f(x_n) =\sin(n\pi) =0$
$f(y_n) =\sin(\frac{(4n+1)\pi}{2}) =1$
Hence, $\lim f(x_n)=0\neq 1 = \lim f(y_n) $
Hence, $\lim_{x\to 0} \sin(\frac{1}{x})$ doesn't exists.