Setup

Put these two things in your preamble.

We use the amsthm package.

\usepackage{amsthm}

The following sets up the styling and formatting of the environments.

% To create a custom style
% \newtheoremstyle{customname}{3pt}{3pt}{bodyfont}{indentamt}{headfont}{headpunct}{headspace}{headspec}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}

\theoremstyle{plain}
\newtheorem{corollary}{Corollary}[theorem]

\theoremstyle{plain}
\newtheorem{lemma}[theorem]{Lemma}

\theoremstyle{definition}
\newtheorem{definition}{Definition}

\theoremstyle{remark}
\newtheorem*{remark}{Remark}

% To change the QED symbol to filled.
% \renewcommand\qedsymbol{$\blacksquare$}

Usage

\begin{theorem}
Theorem here...
\begin{proof}
Proof of theorem here...
\end{proof}
\end{theorem}
\begin{corollary}
Corollary here...
\end{corollary}
\begin{remark}
Remark here...
\end{remark}
\begin{lemma}
Lemma here...
\end{lemma}
\begin{definition}[Optional title.]
Definition here...
\end{definition}