Writers are also readers. One of the best ways to learn about the conventions and expectations of a genre is to read books in that genre.
To get you started, here are some great examples of books from some of the most popular genres.
Be sure to check out some of Gumberg Library's other guides on Mystery Fiction and Science Fiction for more background on those genres.