Generate a square and line

Without more details about the width and height of the framed box and a MWE, this is a raw answer:

\documentclass{article}
\usepackage{pgffor}
%\usepackage{setspace}
\newcommand\leftbox[1]{%
\par\noindent
\begin{minipage}[t]{.45\textwidth}
\fbox{%
\parbox[t][5cm]{\dimexpr\textwidth-2\fboxrule-2\fboxsep}{%
#1}%
}%
\end{minipage}%
}%
\newcommand\lines[1]{%
\hfill
\begin{minipage}[t]{.45\textwidth}%
\noindent
\foreach \x in {1,...,#1}{%
\rule{\textwidth}{1pt}\\[1em]}%
\end{minipage}%
}%
\begin{document}
\leftbox{text will be placed here inside this box with a frame}\lines{4}
\end{document}

enter image description here

The pgffor package can be avoided by using (Thanks to Gonzalo):

\newcounter{lines} 
\newcommand\lines[1]{% 
\hfill 
\begin{minipage}[t]{.45\textwidth}% 
\loop \ifnum\value{lines}<#1\relax 
\rule{\textwidth}{1pt}\\[1em] 
\stepcounter{lines}% 
\repeat 
\end{minipage}
}

There are various possibilities for the alignment, but something like this

enter image description here

\documentclass{article}

\long\def\leftbox#1{\fbox{\parbox[t]{.4\textwidth}{#1}}}
\def\lines#1{\parbox[t]{.4\textwidth}{\par%
\count0=#1
\vskip-\ht\strutbox
\loop
\vskip\baselineskip
\hrule width\hsize
\advance\count0 -1
\ifnum\count0>0
\repeat}}

\begin{document}

\leftbox{The text goes here\\
and here\\
and here}
\lines{4}

\end{document}