The line between over-the-counter and prescription-only is drawn differently in every country, sometimes surprisingly so. Basics like paracetamol, ibuprofen, antihistamines, oral rehydration salts, and cold remedies are available without prescription almost everywhere, though pack sizes and strengths vary. Beyond that it diverges: some countries sell antibiotics, strong painkillers, or contraceptives over the counter, while others are stricter than you'd expect, and a few treat medicines that are ordinary at home, certain codeine products, sleep aids, ADHD medications, as controlled substances requiring permits even to bring in.
For your home prescriptions, two separate questions matter. Bringing them in: carry original packaging plus the prescription or a doctor's letter, keep quantities to personal-use amounts, and check the destination's controlled substances list before flying, since this is where travelers get into genuine trouble. Refilling locally: foreign prescriptions usually aren't directly dispensable, so you'll typically need a local doctor to rewrite them, a quick and routine visit in most places.