CODE
\usepackage{tikz}
\usepackage{pgfplot}
\usepackage{tikz}
\usepackage{pgfplot}
\begin{tikzpicture}
\begin{axis}[option of the axis]
...
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[xmin=-5, xmax=5, ymin=-5, ymax=5, axis x line=middle, axis y line=middle]
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[xmin=-5, xmax=5, ymin=-5, ymax=5, axis x line=middle, axis y line=middle]
\addplot[domain=-5:5]{2*x+2};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[xmin=-5, xmax=5, ymin=-5, ymax=5, axis x line=middle, axis y line=middle]
\addplot[domain=-5:5]{2*x+2};
\addplot[domain=-5:5, color=red]{2*x+2};
\addplot[domain=-5:5, color=blue]{2*x+2};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[xmin=-5, xmax=5, ymin=-5, ymax=5, axis x line=middle, axis y line=middle]
\addplot[domain=-5:5]{2*x+2};
\addplot[domain=-5:5, color=red]{2*x+2};
\addplot[domain=-5:5, color=blue]{2*x+2};
\addplot[matk=*] coordinates {(2,2)};
\addplot[matk=*] coordinates {(0,0)};
\addplot[matk=*] coordinates {(-2,-2)};
\addplot[matk=*] coordinates {(0,2)};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[title=Here goes the title]
\addplot[domain=0:5]{x+2};
\end{axis}
\end{tikzpicture}
Now that you know the basic try to draw the function: F(x)=x^2 -4 and put 2 dot where the function intersect with the x axis. For the solution move the mouse over the black box on the right side.
\begin{tikzpicture}
\begin{axis}[xmax=5, xmin=-5, ymax=5, ymin=-5, axis x line=middle, axis y line=middle]
\addplot[domain=-5:5]{x^2-4};
\addplot[mark=*] coordinates {(-2,0)};
\addplot[mark=*] coordinates {(2,0)};
\end{axis}
\end{tikzpicture}