There are a few different situations in which someone would become eligible to enroll into Medicare, the most common are below.
AGE: Medicare coverage based upon your age is at 65. For some who immigrated to the US later in life it could be after 65, depending on residency or alien status.
DISABILITY: If you are receiving Social Security disability, after 2 years of receiving benefits, you become eligible for Medicare Part A and B. You may be eligible at an earlier date if you are on dialysis, read below.
END-STAGE RENAL DISEASE (ESRD): In the event you have kidney failure and/or a transplant and start a period of dialysis, you could be eligible for Medicare even if you are not on Disability.