An underscore in the LaTeX document is a reserved special character. We'll show you how you can insert an underscore anyway..
Like other special characters, an underscore is reserved for LaTeX commands. With an underscore you can set an index in math mode, for example "$ x_ {1} $" is converted to "x 1 ". How you can create an underscore or underline an entire word in normal running text is explained in the following article.
If you want to insert an underscore in text mode, you must \ mark it with an introductory backslash . Simply write in text mode \_ and LaTeX creates an underscore in the outgoing document for you.
\
\_
You can \underline{Text} underline a whole word in LaTeX with the command . Replace "Text" with the desired word or with several words. Finally, a minimal example summarizes both cases:
\underline{Text}