1. Make sure the encoding of the tex file is UTF-8,
2. Add a line of command at the beginning of the document, that is
\usepackage[UTF8]{ctex} ,
As follows:
\documentclass{article}
\usepackage[UTF8]{ctex}
\begin{article}
test
Chinese
\end{article}
Chinese can be displayed after compiling.