Mystery movies are not always whodunits in which a crime has been committed and an intrepid detective is on the trail of the perpetrator. Just as often, mysteries are thrillers in which the characters are as confused about what's going on as the audience is. Strange happenings are afoot, and the unfolding of the plot clears up the mystery. The one thing that always true of a mystery, though, is that the audience is never quite sure what's going to happen next.
The traditional whodunit has certainly always been a common type of mystery movie, however. The detectives of classic literature made the journey from the page to the screen early on in the history of film, with characters like Arthur Conan Doyle's Sherlock Holmes and Agatha Christie's Miss Marple becoming nearly as popular on film as they were in books.
There is room in the mystery genre, also, for crime and legal thrillers in which intricate conspiracies and plots reveal themselves, as well as action movies in which dynamic sequences, instead of dialogue and character, move the audience toward the mystery's resolution. And, finally, there is the supernatural mystery, in which mystical forces and extraordinary circumstances are what's hiding things from the characters and the audience.