It's a bit like "every day" vs. "everyday".
If you could equally replace "every day" with "most days" or "every week" or "every single day" or "every other day" — that is, "every" and "day" are operating as independent words within the sentence — then you say "every day" e.g. "I go shopping every day".
But if you're using "everyday" as an adjective meaning something like commonplace or ordinary, like "it's just an everyday sandwich, nothing special", then it's all one word.
Same with this — if the words are operating independently in the sentence, they're separate, but when the words have become combined into a single meaning-unit, you hyphenate them, or join them into one word.
If you said "This is my kit for detecting metal" the words are operating separately in the sentence. But with "This is my metal-detecting kit" the word "metal-detecting" has been turned into a single adjective made up of two words rearranged and pushed together.
It usually happens when multiple words come together to make up a new adjective, like everyday or metal-detecting. But it can also happen in other ways.
With "I like combing beaches", you could just as easily say "searching beaches" or "combing dunes", if you wanted to, so these two words are acting as independent words and shouldn't have a hyphen.
But you can turn them into a single meaning-unit by saying "I like beachcombing/I like beach-combing", in which case they're rearranged and pushed together into one word or a hyphenated word.