Boy, are you in trouble!
But first, a disclaimer. I am not a legal expert, and if you are in any doubt about the subjects I’m talking about, you should consult an authoritative source.
In general, as most writers are aware, the maker of an artistic work (e.g. painting, novel, photograph, concerto) automatically owns the copyright to said work. Selling the work does not constitute selling the copyright. This is an issue that occasionally confuses writers, for example, but it is worth remembering that even if a publisher agrees to publish your new novel, you retain the ownership and copyright to that novel, unless you specifically sign them away.
This means that the painter of a picture may sell the picture, but the new owner has no right to make any copy of this work for any purpose, and the artist retains the right to do so. Again, if the new owner is to have the right to make a copy of the picture and publish it, the artist must specifically assign the new owner the right to do so. After all, purchasing a novel or a music CD does not confer the right to copy and sell either of those.
But it’s not all as straightforward as that, and it’s more complicated if an artist has been specifically paid to create it for a purpose, or creates it as part of their duties for an employer. In this case, the employer / commissioner may hold the copyright.
As an example of this, my novel Making Friends with the Crocodile features an image from one of my paintings on the cover (see picture on the right). I sold the painting many years ago, but the image still belongs to me as I did not sign it away.
Therefore if you wish to use an image on the cover of your book that does not belong to you, you must obtain written permission from the copyright holder to do so. If so, then what you will almost certainly get / buy are reproduction rights and NOT the copyright. That would give you the right to use the image for certain purposes (e.g. book cover) but the artist retains the right to sell the reproduction rights to others, too.
Unless they are exclusive reproduction rights. See? I told you this could get complicated.
It is possible to take (another) artist’s work and sufficiently transform it so that it becomes a new work, but again the devil is in the detail (quite literally). There have been a number of cases where artists have taken others to court to argue the point – and the point is whether the new work is sufficient transformative to be considered a new work. As an example, a photograph downloaded from the internet and then either just being subject to colour changes, or having another image added to it, was considered to be infringing the original copyright.
But there have been other cases where the original image has been altered sufficiently to be considered a new work. If you are intending to go down this route, you would be wise to acquaint yourself with the ins and outs of this. To get a more detailed analysis, you might find this link useful: February 13th Creative
And if you have paid someone for an image for your cover? It might be someone you know, or it might be over the internet (perhaps one of these ‘get a service for five dollars’ sites), but the law doesn’t change. Ensure you have the appropriate permission, preferably signed, before pressing the ‘publish’ button with their image on your cover.
It could save you an awful lot of hassle.