Rendering a page, not extracting an image
This draws each page exactly as a reader would display it — text, vector artwork, embedded pictures and all — and saves the result as a JPG. It is not pulling the photographs out of the PDF; it is photographing the page. That distinction matters if what you wanted was the original embedded images at their native resolution, which this does not give you.
Because it is a render, resolution is a choice rather than a property of the file. Pages are rasterised at 2× their nominal size, which keeps text legible on a high-density screen and when zoomed.
One page or many
A single-page PDF comes back as one image. A longer document comes back as a ZIP with one image per page, numbered with leading zeros so they sort in reading order in a file manager — page 10 sorting above page 2 is the default otherwise. The reason for the archive is that browsers block the second and subsequent downloads of a burst, so handing back one file is the only way every page reaches you.
JPG is the right choice for pages that are mostly photographic. For pages that are mostly text or line art, PDF to PNG avoids the compression halos JPEG leaves around lettering. To go back the other way, JPG to PDF reassembles images into a document.