MusicTechHelpGuy walks through the setup step that makes Logic Pro's Apple Loops actually work with your song, before you drag a single loop into the timeline.
Set your project's meter and key first. Loops built in a major key won't stretch to fit an unrelated minor key, since that's a different mode entirely, but moving between closely related keys, like E minor to C# minor, works fine.
The loop browser's scale filter lets you narrow results to major, minor, both, or neither, so you're only auditioning loops that actually match your project.
Apple Loops come in four types, color-coded in the browser: blue audio loops, green MIDI loops, purple pattern loops, and yellow session player loops. Everything but audio is MIDI under the hood.