Your question is quite broad and therefore it is not easy to answer.
But I took your MWE and changed it in a way you may want to have it.
I kept the code as near to your MWE as possible. Especially, many font settings are superfluous, but I kept them.
I would not add a \newcommand inside an environment if there is no specific reason for it (e.g. dependency of environment parameters). So, I moved these commands outside.
The options for a tcolorbox are given by a key-value list. I made some settings which look like in the picture you provided.
The code is:
\documentclass[11pt]{article}
\usepackage[many]{tcolorbox}
\usepackage{lipsum}
\newcommand\given[1]{\par\noindent\fontfamily{cmtt}\selectfont\textbf{\sffamily Given}: #1\par\bigskip}
\newcommand{\goal}[1]{\par\noindent\fontfamily{cmtt}\selectfont\textbf{\sffamily Goal}: #1\par\bigskip}
\newcommand\discussion[1]{\par\noindent\fontfamily{cmtt}\selectfont\textbf{\sffamily Discussion}: #1\par\bigskip}
\newcommand\algorithm[1]{\par\noindent\fontfamily{cmtt}\selectfont\textbf{\sffamily Algorithm}: #1\par\bigskip}
\newenvironment{problem}[1][]{%
\begin{tcolorbox}[enhanced jigsaw,
breakable,
sharp corners,
beforeafter skip=10pt,
size=fbox,
boxrule=0pt,
frame hidden,
colback=black!10
]
\fontfamily{cmtt}\selectfont\textbf{\sffamily Problem}: #1 \par\bigskip
}{\end{tcolorbox}\par}
\begin{document}
\lipsum[5]
\begin{problem}[My Problem]
\given{\lipsum[1]}
\goal{\lipsum[2]}
\discussion{\lipsum[3]}
\algorithm{\lipsum[4]}
\end{problem}
\lipsum[6]
\end{document}

As a second step, I modified this example a little bit more to help your for your own modifications:
I removed superfluous font settings.
\newenvironment is replaced by \newtcolorbox which is shorter and provided some exta goodies if needed.
Some colors are added.
The problem title line is put into a title with own coloring.
The code is:
\documentclass[11pt]{article}
\usepackage[many]{tcolorbox}
\usepackage{lipsum}
\newcommand\given[1]{\par\noindent\textbf{\sffamily Given}: #1\par\bigskip}
\newcommand{\goal}[1]{\par\noindent\textbf{\sffamily Goal}: #1\par\bigskip}
\newcommand\discussion[1]{\par\noindent\textbf{\sffamily Discussion}: #1\par\bigskip}
\newcommand\algorithm[1]{\par\noindent\textbf{\sffamily Algorithm}: #1\par\bigskip}
\newtcolorbox{problem}[1][]{enhanced jigsaw,
breakable,
sharp corners,
beforeafter skip=10pt,
size=fbox,
boxrule=0pt,
frame hidden,
colback=blue!10,
fontupper=\fontfamily{cmtt}\selectfont,
fonttitle=\sffamily,
colbacktitle=blue!50!black,
title={\textbf{\sffamily Problem}: #1},
top=3pt
}
\begin{document}
\lipsum[5]
\begin{problem}[My Problem]
\given{\lipsum[1]}
\goal{\lipsum[2]}
\discussion{\lipsum[3]}
\algorithm{\lipsum[4]}
\end{problem}
\lipsum[6]
\end{document}

tcolorbox. (I'd suggest searching CTAN but you can't right now - it isn't working.) – cfr Jan 21 '15 at 04:17mdframedif your environment needs to allow page breaks. – cfr Jan 21 '15 at 04:18