Medications have to pass safety tests before they can be prescribed, and these tests are routinely carried out on non-human animals. Medications may also contain animal ingredients such as gelatin and lactose. In some cases alternative medications can be prescribed. However, they may be unsuitable for you or less effective, or they may have more side effects. In other cases there are no alternatives.
Vegans avoid using animals 'as far as is practicable and possible'. This definition recognises that it is not always possible to make a choice that avoids the use of animals. Sometimes, you may have no alternative to taking prescribed medication. Looking after yourself and other people enables you to be an effective advocate for veganism.