A loop is a range that can be played end to end without a seam. Getting one out of a recording is two jobs: choosing the range, and writing the repeats without a click between them.
Choosing the range
Drag across the waveform and turn on loop playback in the transport. What you hear is what the file will do at each join, so audition before exporting rather than after.
The start matters more than the end. Put it just before a transient, where the waveform is quiet and the ear is busy with the hit that follows, and a small mismatch stops being audible.
Bar snapping
If the source has a steady tempo, the detector reports it and the loop end can be locked to a whole number of bars from wherever the start sits.
This is what makes musical loops work. A four bar loop at 128 BPM is 7.5 seconds exactly. Miss by 20 ms and the loop is 0.27% short, which is inaudible once and half a beat out after fifty repeats.
Free mode leaves the range exactly where you dragged it, which is what you want for ambience, room tone, and anything without a pulse.
The seam
Each copy is ramped in and out over the blend time and butt-joined to the next. The default 2 ms is short enough to be inaudible on a transient and long enough to remove the step where two samples do not line up.
Longer is not better. A blend of 20 ms noticeably dips the level at every join, which on a fast loop is a tremolo. If a short blend does not fix a tick, the loop points are wrong.
Tempo detection
Tempo comes from the same onset autocorrelation the BPM detector uses, measured over the whole file in the same pass that reads the waveform. Material with no steady pulse reports nothing, and the bar controls are then just arithmetic you should not trust.
Output length
The result is the loop length times the repeat count, exactly. A 2 second loop repeated 60 times is 2 minutes, which is the usual reason to reach for this: a short piece of ambience turned into a bed long enough to sit under a whole scene.