endl writes a new-line to the stream, so subsequent output will appear on the next line. It also flushes the stream's buffer, usually causing a slow-down.
This flushing means that 99% of the time, endl is a mistake, and you should just write "\n" (or '\n') instead. When you really do want to flush the stream, I think it's better to make that explicit by invoking std::flush instead:
std::cout << x << '\n' << std::flush;
As far as run-time actions goes, this is equivalent to using std::endl, but in terms of making your intent clear, it's drastically superior.