I'm confused by your confusion 😛
You apply to both DO and MD programs (and dual DO/MD programs) using ERAS. Think of ERAS as AACOMAS/AMCAS. So you can apply to DO programs, MD programs, and dual DO/MD programs.
Then you apply for the match. You can apply for the AOA Match, the NRMP Match, or both. DO programs will use the AOA Match, ACGME programs will use NRMP match (for the most part, excluding a few specialties), and dually accredited AOA/ACGME programs can use both matches.
As a DO applicant, you can apply for both matches, or just one of them (AOA or ACGME).
If you interview at a DO program and like it enough to rank, then you rank it in the AOA Match. If you don't like it, you don't rank it in the AOA match. You can participate in the AOA Match and not submit a rank list ... in which case, you will go unmatch. That means you are still eligible for the NRMP Match if you apply and submitted a list. If you submit a rank list to the AOA and happen to match, then you are pulled from the NRMP Match. If you submit a rank list to the AOA and go unmatch, you are still eligible for the NRMP Match.
Programs that are dually accredited can participate in both AOA and NRMP Match (although some may choose to go through only one match). It is possible as a DO to match into a program via the NRMP Match (and initially go unmatched in the AOA Match). Let's say a program can take 8 residents a year. This hypothetical program specifically reserve 2 spots for the AOA Match. While you may not have matched for those 2 spots through the AOA Match, if the program likes you and rank you high enough in the NRMP Match (and you rank them high enough in your NRMP Match list), then you may still match into that program via the NRMP Match. And you still get the full benefit of the dually accredited program, even if you entered it via the NRMP instead of the AOA Match.
It's very confusing. Hope this clarifies some stuff.