In your given code snippet are several issues, some I can correct, some not because you did not told us what you want to archive. I use \cvtest for the following remarks and in the mwe below ...
- To use a new box you need to initialize it:
\@initializebox{\cvtestyearbox}
- To use a new length you have to define it:
\newlength{\cvtesttitleboxwidth}
- Because we have to use
\@initializebox we need to use \makeatletter and \makeatother
- Some of your brackets are in the wrong position. For example: you can not open an
\parbox and close inside it an minipage, opened before the \parbox ...
Update:
Because you gave more informations now, I deleted the code I guessed before. See below the MWE with correct working code.
The main issue here is a missunderstanding, because the code you used was not build for \moderncvstyle{classic}, it was build for \moderncvstyle{casual}.
Therefore the code for \cvtest (see the new name please!):
\makeatletter
\@initializebox{\cvtestyearbox} % <====================================
\newlength{\cvtesttitleboxwidth} % <===================================
\newcommand*{\cvtest}[4][.25em]{%
\savebox{\cvtestyearbox}{%
\hspace*{2\separatorcolumnwidth}%
\hintstyle{#2}}%
\setlength{\cvtesttitleboxwidth}{\widthof{\usebox{\cvtestyearbox}}}%
\setlength{\cvtesttitleboxwidth}{\maincolumnwidth-\cvtesttitleboxwidth}%
\begin{minipage}{\maincolumnwidth}%
\parbox[t]{\cvtesttitleboxwidth}{%
\strut%
{\bfseries#3}%
\strut}%
\usebox{\cvtestyearbox}%
\end{minipage}%
\ifx&%
\else{%
\newline{}%
\begin{minipage}[t]{\maincolumnwidth}%
\small%
#4%
\end{minipage}}\fi%
\par\addvspace{#1}}
\makeatother
compiles now, but with the wrong result:

To get the \cvthing command usable in style classic you need to start with the definition of cventry in this style:
\renewcommand*{\cventry}[7][.25em]{%
\cvitem[#1]{#2}{%
{\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6}%
.\strut%
\ifx&%
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}
That we can now change to:
%\cvthing{year--year}{title}{description} % <===========================
\newcommand*{\cvthing}[4][.25em]{%
\cvitem[#1]{#2}{%
{\bfseries#3}%
\strut%
\ifx&%
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#4\end{minipage}}\fi}}
So at last we get with the following complete code
\documentclass[11pt,a4paper,sans]{moderncv}
% moderncv themes
\moderncvstyle{classic} % casual, classic, banking, oldstyle and fancy
\moderncvcolor{blue}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
%\cvthing{year--year}{title}{description} % <===========================
\newcommand*{\cvthing}[4][.25em]{%
\cvitem[#1]{#2}{%
{\bfseries#3}%
\strut%
\ifx&%
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#4\end{minipage}}\fi}}
\makeatletter
\@initializebox{\cvtestyearbox} % <====================================
\newlength{\cvtesttitleboxwidth} % <===================================
%\cvtest{year--year}{title}{description} % <===========================
\newcommand*{\cvtest}[4][.25em]{%
\savebox{\cvtestyearbox}{%
\hspace*{2\separatorcolumnwidth}%
\hintstyle{#2}}%
\setlength{\cvtesttitleboxwidth}{\widthof{\usebox{\cvtestyearbox}}}%
\setlength{\cvtesttitleboxwidth}{\maincolumnwidth-\cvtesttitleboxwidth}%
\begin{minipage}{\maincolumnwidth}%
\parbox[t]{\cvtesttitleboxwidth}{%
\strut%
{\bfseries#3}%
\strut}%
\usebox{\cvtestyearbox}%
\end{minipage}%
\ifx&%
\else{%
\newline{}%
\begin{minipage}[t]{\maincolumnwidth}%
\small%
#4%
\end{minipage}}\fi%
\par\addvspace{#1}}
\makeatother
% personal data
\name{John}{Doe}
\title{Resumé title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{john@doe.org}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
\social[twitter]{jdoe}
\social[github]{jdoe}
\extrainfo{additional information}
\photo[64pt][0.4pt]{example-image-a}
\quote{Some quote}
\setlength{\footskip}{66pt}
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution--3}{City--4}{\textit{Grade}--5}{Description--6} % arguments 3 to 6 can be left empty
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\cvthing{year--year}{Degree}{Institution}% <============================
\cvtest{year--year}{Degree}{Institution}% <=============================
\section{Master thesis}
\cvitem{title}{\emph{Title}}
\cvitem{supervisors}{Supervisors}
\cvitem{description}{Short thesis abstract}
\end{document}
the following result (see that \cvtest is not correct for style classic!):

moderncvdo you use? Current is 2.0.0. Please do not post only a code, describe what it should do and/or add an images showing what you want to get ... – Mensch Apr 03 '19 at 01:05