Medicare Part A or Part C is considered minimum essential coverage, and therefore precludes eligibility for premium tax credits through the Marketplace. A person with Medicare coverage can purchase a QHP at full price.
If you are enrolled in coverage through the Marketplace, you can keep it until your Medicare coverage starts. As soon as you enroll in Medicare, it is important to terminate Marketplace coverage to avoid paying full price for a plan. In most cases, it's to your advantage to sign up for Medicare when you're first eligible. Once eligible for Medicare, you’ll have an Initial Enrollment Period to sign up for Medicare. For most people, the Initial Enrollment Period starts 3 months before their 65th birthday and ends 3 months after their 65th birthday. More information can be found at Medicare.gov.