Medicare is the federal health insurance program for US Citizens or legal residents who lived in the USА for at least 5 years:
I’m turning 65 in the next 3 months, and I’m NOT already getting Social Security Benefits
You will need to apply for Medicare through Social Security, starting 3 months before you turn 65 during the Initial Enrollment Period.
I’m turning 65 in the next 3 months, and I’m already getting Social Security Benefits
You will be automatically registered with Medicare (Part A and Part B), and don't need to sign up.
I’m under 65 and I have a disability
You will be automatically registered with Medicare (Part A and Part B), after you get Disability benefits from Social Security for 24 months.