Yes, foreach is a TikZ/PGF statement. It is described in the very detailed pgfmanual. You can also use it independently of TikZ/PGF by issuing \usepackage{pgffor} in your preamble. This is not necessary if you're using TikZ, as it will be loaded automatically.
Here's an example of how to achieve what you described in your question. \pgfmathsetmacro<macroname>{<expression>} uses the PGF math engine to do the calculation and assigns the result to a macro, while \pgfmathprintnumber rounds and outputs the result.
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\foreach \x in {1,...,7} {
\pgfmathsetmacro\result{\x * pi}
\draw (\x,-4pt) -- (\x,4pt)
node [below,yshift=-2ex] {\x}
node [above] {\pgfmathprintnumber{\result}};
}
\draw [-latex] (1,0) -- (7.6,0);
\end{tikzpicture}
\end{document}
