There is a process which allows athletes to take medication containing a prohibited substance if they need to for medical reasons. This is called the Therapeutic Use Exemption (TUE) process.
Athletes may need to apply for a TUE if they get sick or injured and require medication or if they have an ongoing medical condition that requires treatment, such as diabetes or asthma.
If athletes compete at a certain level and in certain competitions, they may need to apply for a TUE before they take medication which contains a prohibited substance.
Other athletes who may be tested and return a positive test due to a medication, are able to apply for a retroactive TUE (this means they can apply after they have been tested). However, they will still need to meet the criteria before a TUE will be granted.