Self publishers aside, the process for the publisher in designing a book cover may be in-house or contracted to a specialist book designer.
The final design may not use a photograph of course, and I am not here to about graphic art.
The designer will often read the book to get a feel for the cover which will hit the correct note. Then a number of roughs will be made, and the design discussed with the publisher, marketing teams and maybe the author and literary agent. If a photograph is being used, the designer will usually request a test copy of the image from the image agent. They are free to use the image as they see fit, often overlaying more than one image to reach the final design.
Here is a nice 5 minute YouTube clip from Random House about the design process.
Once the final cover is chosen, if your photograph has been used your agent will negotiate the fee. The deal will depend on factors such as sales area, number of copies to be published, exclusivity etc. America is the largest market attracting the highest fees.
You then just have to sit back and wait for the print run and eventual payment which can take months.