PDF → EPUB. The book structure is rebuilt from the PDF's text layer: lines are grouped into paragraphs, hyphen-split words are re-joined, chapters come from the PDF's table of contents (bookmarks) or, failing that, from large headings. Images are embedded in reading order, and the first page becomes the cover by default. Title and author are pre-filled from the file properties — you check them rather than type them.
EPUB → PDF goes the other way: the book is rendered onto A4 pages with its table of contents preserved — handy for printing or for anywhere that asks for 'PDF only'. A frequent question is how EPUB differs from FB2. Both are reflowable, but EPUB is the international standard understood by Apple Books, Google Play Books, and nearly every reader; FB2 lives mostly in the Russian-speaking web. When in doubt, pick EPUB; for older readers with native FB2 support we have a separate tool.
The one hard limitation: a book is built only from a text-based PDF. A scan of a paper book is a stack of images with no text layer — there is nothing to build chapters from. In that case run the file through OCR first, get a PDF with a text layer, then convert it to EPUB.