The core of TikZ is the tikzpicture environment. After including the package with \usepackage{tikz}, graphics can be defined directly within the LaTeX document. Everything between \begin{tikzpicture} and \end{tikzpicture} belongs to the graphic. Shapes, lines, nodes, and styles are described exclusively via commands, not through a graphical interface.
% In the preamble
\usepackage{tikz}
% In the document
\begin{tikzpicture}
% sketch
\end{tikzpicture}
Key points
tikzpicture is the central environment
the code is interpreted from top to bottom
graphics are part of the document and scale without loss