Short answer
A condition may disqualify a pilot if it creates an unacceptable safety risk. Many cases are assessed individually by an aviation medical examiner.
Answer
A medical condition can disqualify someone from being a pilot if it affects the safe operation of an aircraft or creates a high risk of sudden incapacitation. The exact decision depends on the licensing authority, the type of medical certificate and the details of the condition.
Case-by-case decisions: Conditions that often need careful review include uncontrolled seizures, serious heart disease, recurrent fainting, severe untreated mental health conditions, substance dependence, significant neurological disease, and vision or hearing problems that cannot be corrected to the required standard.
Some conditions are not automatic career blockers. Diabetes, treated mental health conditions, previous surgery or stable heart problems may be assessed case by case in some regulatory systems. The authority may ask for specialist reports, treatment history, monitoring results or operational limitations before making a decision.
Medication also matters. A condition may be acceptable, but a medicine used to treat it may cause side effects that are not compatible with flying.
If you have a known medical issue, speak to an aviation medical examiner before starting expensive training. Do not rely on general internet advice, because medical certification decisions are individual and authority-specific.
There is also a difference between temporary unfitness and permanent disqualification. A pilot may be grounded for a period after surgery, illness, medication changes or a mental health episode, then return after review if the authority is satisfied that the risk is controlled.
Hiding a condition is dangerous and can damage a career more than the condition itself. Aviation medical systems are strict, but they also allow structured review in many cases. Early, honest contact with an aviation medical examiner is the practical route.
Next step: Check the Pilot Requirements Guide before spending serious money on training.