\documentclass[tikz]{standalone}

\usetikzlibrary{patterns,decorations.pathmorphing}

\begin{document}

\begin{tikzpicture}
    \tikzset{spring/.style={thick,decorate,decoration={aspect=0.5, segment length=5, amplitude=6,coil}}}
    \fill[pattern=north east lines] (-1, 0.3) rectangle (1,0);
    \draw [very thick] (-1, 0) -- (1, 0);
    \draw [spring] (0, -0.3) -- (0, -2.5);
    \draw [thick] (0, 0) -- (0, -0.3);
    \fill (0, -2.56) circle (0.1);
    \node at (0.7, -2.56) {$M,m$};
    \draw [->] (0, -2.56) -- (0, -3);
    \node at (-0.5, -2.9) {$\vec e_z$};
\end{tikzpicture}

\end{document}
