"Sleuth" is an idiomatic or slang word for a detective. It can also be used as a verb as in "to sleuth for clues". It originated as a word for a bloodhound, a literal sleuth used to sniff out people or things.
Sleuths in fiction include all forms of detective, be they amateur, private inquiry agents ("private eyes") employed by clients, or police. The term sleuth tends to be used for people who have made a career - or a time consuming hobby - out of solving crimes. Someone like Miss Marple is clearly a sleuth despite her claims to the contrary. Sometimes people caught up in a single mystery are referred to as amateur sleuths - implying it's a one-off thing for them.