Most of the time you can bring your filled prescription to another country but check in advance because drugs that may be legal in one country may be illegal in another. As for a new purchase, some countries don't require prescriptions for many medications and they can be purchased over the counter. For drugs that require a prescription, you will most likely need to get a local doctor to write one for you.