\usepackage{algorithm}
\usepackage{algorithmic}
\begin{algorithm}[tb]
\caption{Algorithm}
\label{alg}
\begin{algorithmic}[1]
\STATE blalblabla \label{cond1}
\STATE blablabla \label{cond2}
\STATE return to step \ref{cond2}.
\end{algorithmic}
\end{algorithm}
As you see it gives "return to step 1" (instead of 2)
Best Answer
If you use a label and a ref, you need to compile your document twice. Otherwise an error may occur.
Which gives when compilied twice: