You want a deep-cycle battery
A lot of people just go "car battery" for any large, wet-cell auxiliary battery. Using an actual car battery would be a mistake.
Lead-acid batteries are full of compromises (comes with the acid), and one of those compromises is that the battery can be good at high-amperage engine starting, OR, be good at delivering low current for long periods. Pick one. Using one for the other will quickly destroy it: car batteries aren't designed to be deep discharged. So using a literal car battery for a CPAP will disappoint, unless it's a one-time thing and you're willing to heave-ho the battery at the end. You want a deep-cycle type battery. These are noted by little screw-down lug terminals in addition to normal battery lugs.
However, "deep cycle" is still not license to drag the battery down to flat. This will prematurely age the deep cycle battery, taking weeks off its life and capacity everytime you do. (as opposed to car batteries, which takes months off their life and capacity).
This thing is easy
It's little more than a plug going into the cigarette lighter. When I make them, I intentionally make them excessively long and with thin wire. Because I want to increase the wire resistance to reduce maximum current, so I don't blow the fuse on the cigarette lighter.
It can be as simple as simply plug it in direct into the cigarette lighter while the car is running and let it charge over time. However you should disconnect it when the engine is off so you don't drain the car's battery, and you MUST MUST MUST disconnect it when starting the car engine (otherwise this battery will try to "help" and will overload the connection). You must also never reverse the wire connection.
So aftermarket devices that help you do this job are basically there as a protection circuit, to prevent it from overloading in any direction.
Lithiums are different
Note that if you attempt this with a lithium battery, all of the above is void. You must use protective circuits with a lithium battery, unless you like explosions. On the upside, lithium batteries don't mind being discharged through their full range.
You may be better off using a so-called "Solar Generator"
If you want all these features bundled in a consumer friendly package, then the google term is "Solar generator". Note that you should avoid (as in turn off/disable) the 120/230V inverter function, since you want 12V. The inverter burns a lot of power just being "spun up" with no loads, so make sure you get one that allows it to be turned off.
You don't need to use solar panels with a "solar generator" but that feature is included. You can just charge it from a cigarette lighter, and it has the necessary protective features.