It can mean you have to go to a government-run outlet, and if it's your first time, someone is going to ask you some pointed questions about why you want to buy it, make it very clear to you that heroin addiction is a real risk and no fun, maybe offer some counseling services on the spot as an alternative, and if you're still determined to get some, you can fill out a form and get a card with your face on it to present next time.
Note that this isn't the same thing as a prescription, where a doctor is gatekeeping access to the medicine / drug in question. It's an approach which acknowledges legal drugs as less harmful to users and society than the alternatives, and stresses harm reduction for everyone and ending addictive patterns for users who are able and willing.