Well, class moderncv
is different to the usual one class article
etc.
Because it is supposed to typeset a curriculum vitae, there are more information needed than in an "usual" class.
Because a cv needs a name of the person the cv is for you have to add the information
\name{John}{Doe}
Now you can compile your MWE with an added \name{John}{Doe}
without errors but not with the layout of a cv:
\documentclass[11pt,a4paper,sans]{moderncv}
% personal data
\name{John}{Doe}
\begin{document}
Hello.
\end{document}
and the result:

That has compiled without errors, but is far away from a cv ...
To get a real cv you have to add more informations, for example the style of the layout. Then you need to add informations about education etc. Class moderncv
provides special commands for that.
The absolut minimal code for an cv with moderncv
is the following MWE:
\documentclass[11pt,a4paper,sans]{moderncv}
% moderncv themes
\moderncvstyle{classic} % 'casual' (default), 'classic', 'banking', 'oldstyle' and 'fancy'
\moderncvcolor{blue} % 'black' (default)
% character encoding
\usepackage[utf8]{inputenc}
% adjust the page margins
\usepackage[scale=0.75]{geometry}
% 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{[email protected]}
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
Hello. % <========= to be deleted!
\end{document}
%% end of file `template.tex'.
I used the original template.tex
file (an cv example) from moderncv
and minimalized it. As you can see in the compiled following MWE, your input "Hello." makes no sense now ...
The result you get is:

moderncv
requires you to set up things in the preamble, which you have not done. Try\documentclass{moderncv} \moderncvstyle{classic} \moderncvcolor{green} \firstname{John} \familyname{Doe} \title{Curriculum Vitae} \begin{document} \maketitle Hello. \end{document}