The last frame's values — position, rotation, color — must match the first frame's exactly. One mismatch and the loop visibly jumps on every repeat, a moment the industry just calls the "loop point."
The easiest way is to design the motion as a cycle from the start: a full rotation, or a wave that completes exactly one period, naturally lands back where it began. Motion that doesn't return on its own — a straight pan, say — sometimes gets a light cross-dissolve stitched between the end and the start to hide the seam.
This matters most in short social loops — Boomerangs, GIFs, background videos. The instant a loop is noticeable, viewers register "I've seen this already" and disengage.
When to use
Shorter loops are easier to hide the seam in — a long, meandering loop will show its stitch somewhere.