A prescription is an order written by a doctor for someone to get a drug that is not available without this permission.
If you get a bad ear infection, you'll need a prescription for antibiotics.
When your doctor writes a prescription, she's advising you to take a medication that you can only get from a pharmacist.