Mystery is a literary genre in which the cause (or causes) of a mysterious happening, often a crime, is gradually revealed by the hero or heroine; this is accomplished through a mixture of intelligence, ingenuity, the logical interpretation of evidence, and sometimes sheer luck.
A thriller is a villain-driven plot, whereby he or she presents obstacles that the protagonist must overcome.