This is based on the the style that you define the environment with. amsmath provides three styles by default (plain, definition and remark), but you can define your own styles using \newtheoremstyle{<style>}.
Here are the basic styles that amsthm defines:

\documentclass{article}
\usepackage{amsthm}% http://ctan.org/pkg/amsthm
\theoremstyle{theorem}\newtheorem{theorem}{Theorem}
\theoremstyle{definition}\newtheorem{definition}{Definition}
\theoremstyle{remark}\newtheorem{remark}{Remark}
\begin{document}
\begin{theorem} Some theorem. \end{theorem}
\begin{definition} Some definition. \end{definition}
\begin{remark} Some remark. \end{remark}
\end{document}
New styles have the following interface (taken directly from the amsthm documentation, section 4.3 New theorem styles, p 4):
\newtheoremstyle{note}% <name>
{3pt}% <Space above>
{3pt}% <Space below>
{}% <Body font>
{}% <Indent amount>
{\itshape}% <Theorem head font>
{:}% <Punctuation after theorem head>
{.5em}% <Space after theorem head>
{}% <Theorem head spec (can be left empty, meaning 'normal')>
The custom theorem head specification is a little more tricky, details of which are included in the AMS Class documentation (section Custom theorem styles, p 63):
There is a \newtheoremstyle command provided to make the creation of
custom theorem styles fairly easy.
Usage:
#1
\newtheoremstyle{NAME}%
#2 #3 #4
{ABOVESPACE}{BELOWSPACE}{BODYFONT}%
#5 #6 #7 #8
{INDENT}{HEADFONT}{HEADPUNCT}{HEADSPACE}%
#9
{CUSTOM-HEAD-SPEC}
Leaving the 'indent' argument empty is equivalent to entering 0pt.
The 'headpunct' and 'headspace' arguments are for the punctuation and
horizontal space between the theorem head and the following text.
There are two special values that may be used for 'headspace': a
single space means that a normal interword space should be used;
"\newline" means that there should be a line break after the head
instead of horizontal space. The 'custom-head-spec' argument follows a
special convention: it is interpreted as the replacement text for an
internal three-argument function \thmhead, i.e., as if you were
defining
\renewcommand{\thmhead}[3]{...#1...#2...#3...}
but omitting the initial \renewcommand{\thmhead}[3]. The three
arguments that will be supplied to \thmhead are the name, number,
and optional note components. Within the replacement text you can (and
normally will want to) use other special functions \thmname,
\thmnumber, and \thmnote. These will print their argument if and
only if the corresponding argument of \thmhead is nonempty. For
example
{\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}
This would cause the theorem note #3 to be printed with a preceding
space and enclosing parentheses, if it is present, and if it is
absent, the space and parentheses will be omitted because they are
inside the argument of \thmnote.
Finally, if you have an extra bit of arbitrary code that you want to
slip in somewhere, the best place to do it is in the 'body font'
argument.
The \newtheoremstyle command is designed to provide, through a
relatively simple interface, control over the style aspects that are
most commonly changed. More complex requirements must be addressed
through a separate LaTeX package.
When you set up custom theorem styles with \newtheoremstyle you
should not use \swapnumbers. You have full control of the ordering
of elements in the theorem head, just place them where you want. Or,
if you do use \swapnumbers, you must look at the definition of
\swappedhead and change it appropriately.
amsthmdefines no theorems, propositions or remarks, but provides theoremstyles for defining such. – Andrew Swann Nov 12 '13 at 19:07