A custom app assumes one merchant, one theme, one configuration.
The decision precedes any code and determines review obligations, billing, support burden and how much you may assume.
A custom app can assume one theme and one configuration; a public app must work on stores you will never see.
Retrofitting a custom app into a public one usually means rewriting the assumptions, because the assumptions are load-bearing.
Build custom when you have a client, public when you have a market — and be honest about which you actually have.
A public app is listed on the Shopify App Store, installable by any merchant, and subject to Shopify's review and requirements.
The full guide has the formats, the deadlines and the worked examples.