Well most of the people write code in small chunks that yields to the following workflow:
- write code
- compile & run, see if it works
Just keep repeating this until you achieved what you want.
In REPL this is exactly the same you just have a much faster way of trying out a concept.
I think this is pretty simple to conceptualise.