Redshirt is really football terminology. The word was used to describe players brought in and stashed away as freshmen to spend heir first year hitting the weights and learning the play book. Calling someone a medical redshirt is basically verbal shorthand - the correct terminology by the NCAA rulebook would be a medical hardship. The term redshirt has just become a catchall shorthand for "not using a season of eligibility this year".
The NCAA rule at Division I is that you have five years to play four seasons. Your eligibility "clock" starts as soon as you enroll in college. You use up a year of eligibility as soon as you see any playing time - unless you fill out a hardship waiver for an injury or other reasons such as a family emergency (in which case there are restrictions, such as that you can play in a maximum of 30 percent of the regular season schedule, and no games at all in the second half of the season).
There are special circumstances when you can go beyond the five years. If you have two seasons with medical hardships, the NCAA will typically give you a sixth year. There are also exceptions for military service, religious missions, pregnancy (female only - no waiver for knocking someone up), or playing pro in a different sport (you sometimes see minor league baseball players go back to school and play football, for example). As soon as you miss a season voluntarily, though - for a transfer, or to hit the weights, etc., you have used up your leeway and can't get a hardship waiver. Same is true in the case of AJ Price, who lost a year to suspension, or else he would have been able to apply for two hardship waivers for health reasons.
In division 2, the rule is 10 semesters instead of five years - with one continuous break permitted. So you can enroll in college, play a year or two, spend 10 years working in a coal mine, and then still have the rest of our eligibility when you go back to school at age 35 or whatever.