change the figure subtitle in documentclass article

Easy with caption package:

\documentclass{article}
\usepackage{graphicx}
\usepackage{caption}                                  %%<--- add this line
\captionsetup[figure]{labelfont=bf,labelsep=period}   %%<--- and this line
\begin{document}
\begin{figure}
  \centering
  \includegraphics[width=3cm]{example-image}
  \caption{This is a picture}\label{fig:pic}
\end{figure}
\end{document}

enter image description here


Just for the sake of showing another possibility...

Without the need of any additional package, you can modify the original definition of \@makecaption as found in article.cls, which is responsible of the caption.

That is, add the following lines in your preamble:

\makeatletter
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{\textbf{#1.} #2}%
  \ifdim \wd\@tempboxa >\hsize
    \textbf{#1.} #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}
\makeatother

Complete example (borrowed by Harish Kumar's one):

\documentclass{article}
\usepackage{graphicx}

\makeatletter
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{\textbf{#1.} #2}%
  \ifdim \wd\@tempboxa >\hsize
    \textbf{#1.} #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}
\makeatother

\begin{document}
\begin{figure}
  \centering
  \includegraphics[width=3cm]{example-image}
  \caption{This is a picture}\label{fig:pic}
\end{figure}
\end{document} 

enter image description here