In the current scenario, the images are arranged in a vertical sense, however I wanted to align the subfigures in a horizontal sense. This is the code that I'm using. Also I'm working on a template, which follows IEEE convention.
\begin{figure}[h]
\begin{subfigure}[b]{0.25\textwidth}
\includegraphics[width=0.7\linewidth,height=5cm]{MobileApp/login.png}
\caption{Login Screen}
\label{fig:login screen}
\end{subfigure}
\begin{subfigure}[b]{0.25\textwidth}
\includegraphics[width=0.7\linewidth,height=5cm]{MobileApp/Selectcanteen.png}
\caption{Select Canteen Screen}
\label{fig:Select canteen screen}
\end{subfigure}
\caption{Caption for this figure with two images}
\label{fig:image2}
\end{figure}

0.5\columnwidthinstead of0.25\textwidthbecause the\textwidthdoes not take the column separation into account, so when you add the%at the end of\end{subfigure}your pictures will overflow the margin (and you'll get aOverfull \hboxwarning). – Phelype Oleinik May 03 '19 at 13:48%problem, I marked with a differen duplicate about the difference of\textwidthand\columnwidth(and other\...widths :) – Phelype Oleinik May 03 '19 at 13:57