The mnemonic I heard from Planet Money was "grey hair? Medicare. Underpaid? Medicaid." Although Medicare will also apply to people under 65 with some conditions.