Here are two ways: the first uses the eqparbox package and an \fbox (or, in the following code \fcolorbox in case you want some colour), the second, a simple tabular with a single centred column, and the makecell package, which allows for line breaks in standard cells.
You also might be interested in the pbox package: the eponymous command is like a \parbox in which the width argument definas actually a minimal width of the box.
\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[svgnames, table]{xcolor}
\colorlet{framecolor}{Gold}
\usepackage{eqparbox}
\usepackage{makecell}
\usepackage{bigstrut}
\newcommand{\myfbox}[1]{\arrayrulecolor{framecolor}\begin{tabular}{|@{\,\,}c@{\,\,}|}
\hline
\makecell[l]{\bigstrut[t]#1 \bigstrut[b]}\\
\hline
\end{tabular}}
\begin{document}
\fboxrule = 1pt
\begin{center}
\fcolorbox{IndianRed}{white}{\eqparbox{mybox}{Some content on the first line \\ some content on the second line \\ and this boxes border are fitting the content.}}
\vskip 1cm
\arrayrulewidth = 1pt
\myfbox{Some content on the first line \\ some content on the second line \\ and this boxes border are fitting the content.}
\end{center}
\end{document}
