Look at articles that do similar things to what you want to accomplish in your thesis.
Describe the articles in a way that the information relevant for understanding your thesis is contained in this chapter.
While you should cite where appropriate in all chapters, here is a demo citation \cite{Ackley1985}.
In particular, you should look at:

\begin{itemize}
    \item Related Work that is a basis for your thesis
    \item Other approaches that exist to your problem (or related problems)
    \item Approaches that are similar to your work, but applied to different problems
    \item Articles that support assumptions or hypotheses you need for your thesis
\end{itemize}

If related work can be sensibly divided into different categories, feel free to create sections accordingly.

\subsection{Discussion}

Discuss trends and how your proposed thesis compares to the related work.
Be sure to also highlight a research gap, i.e., what hasn't been considered yet.
Depending on your thesis, this may be a logical next step, a method that is less computationally expensive, the incorporation of more data, requiring less data, or something else.

\textit{The related work chapter should normally be 1--2 pages long.}