A loop invariant is a condition that holds true before and after each iteration of a loop and after the loop exits in an algorithm.
For a computer scientist, the confirmed presence of a loop invariant will prove that the loop will (1) eventually terminate/exit (and won't become an infinite loop), and (2) produce the correct result.
Here is a detailed description of each of the stages in which the invariant must be true:
Let's see a couple examples of loops and their invariants.