Are you confused?
I surely was confused, because I would get different answers each time I read an article or book. However, the answer is that it actually depends on the implementation.
Let me explain.
An interpreter does this during runtime and executes statement by statement. A compiler translates beforehand and requires more time, but this allows the compiler to optimize and give us a fast execution later on when we run the code.