The beamer class doesn't work well with TikZ's matrices. To make it work, you need to reset ampersand replacement to \& for example, and use \& for column separations:
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{frame}
\frametitle{\textbf{\emph{m-way} Search Tree}}
\begin{figure}
\centering
\scalebox{0.4}{
\begin{tikzpicture}
\tikzset{every matrix/.style={inner sep=-\pgflinewidth,matrix of math nodes,column sep=-\pgflinewidth,nodes={draw=red,font=\color{blue},minimum size=.75cm,anchor=center},ampersand replacement=\&}}
\matrix[above] (t1) at (0,0) {18 \& 44 \& 76 \& 198\\};
\matrix[below] (b1) at (0,0) {\bullet \& \times \& \times \& \bullet \& \bullet\\};
\matrix[above] (t21) at (-5,-4) {7 \& 12\\};
\matrix[below] (b21) at (-5,-4) {\times \& \bullet \& \times\\};
\matrix[above] (t22) at (0,-4) {80 \& 92 \& 141\\};
\matrix[below] (b22) at (0,-4) {\bullet \& \times \& \times \& \bullet\\};
\matrix[above] (t23) at (5,-4) {262\\};
\matrix[below] (b23) at (5,-4) {\times \& \bullet\\};
\matrix[above] (t31) at (-7.5,-8) {8 \& 10\\};
\matrix[below] (b31) at (-7.5,-8) {\times \& \times \& \times\\};
\matrix[above] (t32) at (-2.5,-8) {77\\};
\matrix[below] (b32) at (-2.5,-8) {\times \& \times\\};
\matrix[above] (t33) at (2.5,-8) {148 \& 151 \& 172 \& 186\\};
\matrix[below] (b33) at (2.5,-8) {\times \& \times \& \times \& \times \& \times\\};
\matrix[above] (t34) at (7.5,-8) {272 \& 286 \& 350\\};
\matrix[below] (b34) at (7.5,-8) {\times \& \times \& \times \& \times\\};
\draw[blue] (b1-1-1.center) -- (t21-1-1.north east)
(b1-1-4.center) -- (t22-1-3.north)
(b1-1-5.center) -- (t23-1-1.north west)
(b21-1-2.center) -- (t31-1-1.north east)
(b22-1-1.center) -- (t32-1-1.north)
(b22-1-4.center) -- (t33-1-2.north east)
(b23-1-2.center) -- (t34-1-3.north);
\end{tikzpicture}
}
\vspace{-0.3cm} \caption{\emph{m-way} search tree}
\end{figure}
\end{frame}
\end{document}
which outputs

However, the numbers are way too tiny. This is my recommended version
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{frame}
\frametitle{\textbf{\emph{m-way} Search Tree}}
\begin{figure}
\centering
\begin{tikzpicture}[scale=0.55]
\tikzset{every matrix/.style={inner sep=-\pgflinewidth,matrix of math nodes,column sep=-\pgflinewidth,nodes={draw=red,font=\color{blue}\footnotesize,minimum size=.55cm,anchor=center},ampersand replacement=\&}}
\matrix[above] (t1) at (0,0) {18 \& 44 \& 76 \& 198\\};
\matrix[below] (b1) at (0,0) {\bullet \& \times \& \times \& \bullet \& \bullet\\};
\matrix[above] (t21) at (-5,-4) {7 \& 12\\};
\matrix[below] (b21) at (-5,-4) {\times \& \bullet \& \times\\};
\matrix[above] (t22) at (0,-4) {80 \& 92 \& 141\\};
\matrix[below] (b22) at (0,-4) {\bullet \& \times \& \times \& \bullet\\};
\matrix[above] (t23) at (5,-4) {262\\};
\matrix[below] (b23) at (5,-4) {\times \& \bullet\\};
\matrix[above] (t31) at (-7.5,-8) {8 \& 10\\};
\matrix[below] (b31) at (-7.5,-8) {\times \& \times \& \times\\};
\matrix[above] (t32) at (-2.5,-8) {77\\};
\matrix[below] (b32) at (-2.5,-8) {\times \& \times\\};
\matrix[above] (t33) at (2.5,-8) {148 \& 151 \& 172 \& 186\\};
\matrix[below] (b33) at (2.5,-8) {\times \& \times \& \times \& \times \& \times\\};
\matrix[above] (t34) at (7.5,-8) {272 \& 286 \& 350\\};
\matrix[below] (b34) at (7.5,-8) {\times \& \times \& \times \& \times\\};
\draw[blue] (b1-1-1.center) -- (t21-1-1.north east)
(b1-1-4.center) -- (t22-1-3.north)
(b1-1-5.center) -- (t23-1-1.north west)
(b21-1-2.center) -- (t31-1-1.north east)
(b22-1-1.center) -- (t32-1-1.north)
(b22-1-4.center) -- (t33-1-2.north east)
(b23-1-2.center) -- (t34-1-3.north);
\end{tikzpicture}
\vspace{-0.3cm} \caption{\emph{m-way} search tree}
\end{figure}
\end{frame}
\end{document}

\documentclass{...}and ending with\end{document}. The easier it is to copy and test your code, the more likely your question will be answered and can help others in a similar situation. – thymaro Apr 15 '19 at 05:55