How can I create this table?

\documentclass{article}

\usepackage{multirow}

\begin{document}

\begin{table}[]
\begin{tabular}{cc|c|c|}
\cline{3-4}
  &  & \multicolumn{2}{c|}{Valori Estimate} \\
\cline{3-4} 
  &  & Clasa & Clasa \\
\hline
\multicolumn{1}{|c|}{\multirow{2}{*}{Valori reale}} & Clasa & 3 & 2 \\
\cline{2-4} 
\multicolumn{1}{|c|}{}  & Clasa & 2 & 3 \\
\hline
\end{tabular}
\end{table}

\end{document}

multirow table


With {NiceTabular} of nicematrix.

\documentclass{article}
\usepackage{nicematrix}

\begin{document}

\begin{table}[]
\begin{NiceTabular}{ccwc{10mm}wc{10mm}}[hvlines-except-corners=NW]
                          &       & \Block{1-2}{Valori Estimate} \\
                          &       & Clasa & Clasa \\
\Block{2-1}{Valori reale} & Clasa & 3     & 2 \\
                          & Clasa & 2     & 3 \\
\end{NiceTabular}
\end{table}

\end{document}

You need several compilations (because nicematrix uses PGF/Tikz nodes).

Output of the above code