If you are receiving SSDI, and only SSDI, then you will get Medicare 2 years after you started getting SSDI. The govt will send you a letter, when it's getting close. See this link:
Metropolitan Boston Housing Partnership ? MBHPMetropolitan Boston Housing Partnership ? MBHP
In the meantime, you might be eligible for Medicaid, if your state cooperated with the goal of Obamacare, which offered federal money to states to help them expand their Medicaid to cover individuals like you. If you live in a "red" state, you might be out of luck. Go to you Income Support office. (That's where you apply for food stamps.) Tell them you want to apply for Medicaid.
Check if there are any publicly operated hospitals in your county - like a hospital run by a state university. That's where I got help, while I was waiting for Medicare to kick in. Big university hospitals sometimes offer outpatient care.