You can use mdframed:
\documentclass{article}
\usepackage{amsthm}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}
\theoremstyle{plain}
\newmdtheoremenv[
linecolor=cyan,
roundcorner=5pt,
linewidth=1pt
]{theo}{Theorem}
\theoremstyle{definition}
\newmdtheoremenv[
hidealllines=true,
leftline=true,
innerleftmargin=10pt,
innerrightmargin=10pt,
innertopmargin=0pt,
]{defi}{Definition}
\begin{document}
\lipsum[4]
\begin{defi}
\lipsum[4]
\end{defi}
\lipsum[4]
\begin{theo}
\lipsum[4]
\end{theo}
\end{document}

The package offers many additional customization options; please refer to the package documentation which also contains numerous examples.
If a same style is to be used for several structures, then it's better to define a style to be used multiple times; the package also offers a very useful \surroundwithmdframed
command to apply mdframed settings to an already defined environment. In the following example I define a style, built an structure for definitions using this style, and surround the standard proof
environment (from amsthm
) with this style:
\documentclass{article}
\usepackage{amsthm}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}
\mdfdefinestyle{mystyle}{
hidealllines=true,
leftline=true,
innerleftmargin=10pt,
innerrightmargin=10pt,
innertopmargin=0pt,
}
\surroundwithmdframed[style=mystyle]{proof}
\theoremstyle{definition}
\newmdtheoremenv[style=mystyle]{defi}{Definition}
\begin{document}
\lipsum[4]
\begin{defi}
\lipsum[4]
\end{defi}
\lipsum[4]
\begin{proof}
\lipsum*[4]
\end{proof}
\end{document}
