Publishers over the years have devoted a lot of time and thought into making the typical mass-market paperback cover, in particular, an effective point-of-sale advertisement for the book within.
People used to joke about the typical gothic-romance cover (dark night; building or tower in the background with a light in one upper window; heroine in the foreground with loose hair and flowing gown/nightgown), but it let a prospective buyer sort out the Victoria Holts from the Zane Greys and the Mickey Spillanes clear across the room from the wire spinner rack.
Things have gotten a lot more subtle since then, especially when it comes to distinguishing between subgenres. The quickest way to signify that the contents of a book involve alternate history, for example, is to put a zeppelin on the cover — even if there are no zeppelins mentioned in the book. (At least one episode of Dr. Who used the same device to let the viewers know within seconds that they were looking at an Alternate Universe London.) Cover art involving a spaceship and a planet but no people usually means that the contents are hard sf, far-future division, while cover art involving stylized computer chips or DNA molecules usually means hard sf, near-future division; cover art featuring a humanoid male or female in a spacesuit or powered armor, with or without a feature-obscuring helmet, tends to signify military sf, while cover art featuring a humanoid male or female in a colorful uniform or elegant clothing, combined with either a spaceship or futuristic weaponry or both, means space opera. Adding sparkles to the cover indicates that the contents are some variety of fantasy. Monochromatic nonrepresentational or stylized cover art means that the publisher is positioning the book as “literary,” rather than “popular,” for whatever values of “literary” vs. “popular” obtain within the field. And so on.
What is the author’s role in all this? A fairly limited one, as it happens. The publisher may ask them for ideas as to what scene or motif from the book would make a good cover, but that’s by no means guaranteed, nor is it guaranteed that the publisher will take any of their suggestions. The publisher will often send the author a copy of the cover art, but unless the author is one of the genuine 800-pound gorillas of publishing, there’s a limit to how much they can persuade the publisher to change things.
(If you’re a writer, you’re always aware that there are only so many arguments you can win with your publisher, and you may not want to expend one of them on a bad cover, so long as it isn’t too bad.)