You have to take/pass COMLEX to graduate DO school, and you have to graduate to get licensed. You'll be licensed as a DO, not an MD, so the MD board exams aren't a licensing yardstick.
There are at least three types of residencies: AOA (aka "DO"), ACGME (aka "MD"), and military. Within any of these types, there are more and less competitive specialties. And whether you go AOA, ACGME or military, yes, it is very difficult to get a competitive residency. "Difficult" here means that you need excellent med school grades, excellent board scores, excellent evaluations, excellent interview skills, etc. to succeed against strong competition. There are still some ACGME residencies where being a DO is effectively a dealbreaker, but the majority of programs have been "broken into" by now.
COMLEX scores are used to evaluate you for all AOA residencies and some less-competitive ACGME residencies.
You have the option to also take the USMLE, if you want to try for more-competitive ACGME residencies.
Note that there are multiple steps to both boards, where each has a step 1 which is taken after preclinical years, and step 2, with or without a clinical skills evaluation, which you take before you graduate. Step 1 is the more important exam for residency selection. Some DOs only take USMLE step 1 on their way to an ACGME residency, but again, the more competitive the residency, the more work you have to do.
Best of luck to you.