Like any drug, you take the drug either by mouth or intravenously through the veins. Then the drug breaks down in the bloodstream. If you take it by mouth, then it needs to get into the bloodstream which may take longer if taken by mouth because it needs to go through the stomach and other systems before getting into the bloodstream.
Once in the bloodstream, the medicine goes through the bloodstream and to the correct part of the body. Once it targets the body part that is hurting, it will shortly make the body part feel better. Sometimes, it takes a lot of time for the medicine to either get into the bloodstream or get to the body part that is hurting.