Drugs have specific formulations that determine the shell life of the drug. Shell life simply refers to the length of time a drug can be used without a decrease in its potency.
Most drugs have a shelf life that is longer than their expiry date. If you take a medications that has expired, it is most likely that the potency and effectiveness of the medication has decresed. Some drugs retain about 70 - 80% of their potency even after a year or two of expiration.
It is advisable that you stay away from expired medicine. The drug might carry out its functions but full potency is usually lost.