About

Math in LaTeX is most commonly set as inline (or text style) mathematics

...here is some text and $<math content>$ and some more text...

or as (or display style) mathematics

...here is some text and
\[
  <math content>
\]
and some more text...

For specific use on the notation/symbols for setting these, see Why is \[ ... \] preferable to $$ ... $$? and Are \( and \) preferable to dollar signs for math mode?

Other packages may also provide variants to their display environments. Most notably listings provides an inline \lstinline version to its display lstlisting environment:

...here is some text and some \lstinline!code!, and some more
\begin{lstlisting}[basicstyle=\ttfamily]
code
\end{lstlisting}
history | show excerpt | excerpt history