Figures in LaTeX are generally positioned where LaTeX deems best, although it gives you some controll over where to place them. However, even when telling LaTeX to place the figure "here!" (h!) it is still a floating figure, and it doesn't necessarily mean that LaTeX will actually place the figure here if it doesn't fit well.
While in many cases the position LaTeX determines is good enough, or better than the placing it exactly where you placed the figure in the document, it's not always ideal. However, by using the package float you can easily force LaTeX to place the figure exactly where you place it in the document.
The float package adds the parameter H to figure positions, which will force the figure to be placed "here" (where it is placed in the LaTeX code).
The following code shows an example of the use of the H parameter.
\begin{figure}[H]
[...]
\end{figure}