\documentclass{article}
\usepackage{amsmath}
\begin{document}
The equation $a^2 + b^2 = c^2$ is typeset as inline. The same can be done in a separate line using
\begin{equation}
  a^2 + b^2 = c^2
\end{equation}
We can also make the equation with a label refer to equation \eqref{mass} to know about the mass energy relation.
\begin{equation}
  E = mc^2 \label{mass}
\end{equation}

\end{document}
