My town actually has an E.R. and urgent care. We have a CVS in town too (my town has a lot of stuff!!). There are also medical taxis (there are no regular taxis here) and private hire ambulances that'll take you if you need a different hospital.
Typically you get the number of the closest general doc to you, and make good friends with your neighbors, so somebody can drive you to a hospital right away if you cut your leg off in the middle of the night. Could be a long way off or right around the corner, it depends.
The biggest thing I never anticipated? Car parts. My brakes went and rather than bring it to the local mechanics I tried to fix it myself. Walk into town takes about 40 minutes, getting the right parts took weeks.
Power also went in the spring due to freezing rain bringing down trees. Cell signal went, along with power and internet, and my water well's pump is electric; heat is propane but the damn heater's thermostat went, probably electric too. So being prepared to be off-grid once a year is useful.
Something to think hard about before you embark on your small town life journey.
For starters, the number of times that myself or either of my former or current spouses has felt the need to seek out a vendor of medications at 0300 has been...zero. That said, and I don't mean to be trite, you deal with it by living like you live 2 hours from an ER. Know your first aid, make doubly sure to keep those fingers away from that table saw (and even that won't likely kill you before you get to the ER). That, and just don't obsess over it. People have lived far away from emergency medical care for many years. Sometimes they die as a result. Sometimes people die driving to the ER that's right down the street. But me and my house, just because a hospital could be close to home doesn't mean it has to be.
(Says the guy smack in the middle of Redmond, WA within a long walk to the ER...or a five minute drive. That hasn't always been the case, however.)
I say that because I know when I met my wife (who was used to the Chinese medical system) she was used to a hospital being the be-all end-all of medical care and very frustrated with the level of service she received... until I introduced her to the clinics and other places she should have been going to have most things treated.
If you're taking yourself to a hospital here without some sort of referral from a doctor you're generally entering through the emergency department which is set up to treat emergencies. Things that will kill you in short order. If I go in for "medication" and it isn't a situation like "I've run out of my life-saving medication and I need a dose to get me through to morning." I'm probably just gonna spend the night sitting in the waiting room. Likely longer. It'd be like putting a P5 ticket in for a team whose responsibility is dealing with P1/P2 tickets. You're gonna be waiting a while for the other higher priority issues to slow down long enough for them to catch up and run out of things to do. If you're lucky they might sneak you in sooner just to avoid blowing the P5 SLA, but even that will only happen if they're _mostly_ caught up on P1/P2 issues.
If it's immediately life-threatening, I call an ambulance. They're about 5-10 minutes away. Not the best, but that means I can get someone with a moderate amount of medical training focused on "keeping you alive" to me in about 10 minutes. If it can't wait until morning but isn't going to kill me in the next hour, I can drive or be driven the 45 minutes to the hospital.
Anything else (like getting medication to treat a condition) I'd just wait until morning and see a normal doctor at the closer clinic. They can provide basic diagnosis and treatment, and there's a pharmacy nearby that can dispense any medications they prescribe.
Be healthy. Also be able to survive a 60 minute wait and ambulance ride to the nearest hospital. I'm totally serious, unfortunately. Locals tend to look healthier for a reason.
And if so, why not get it from a pharmacy?
Where is that, just curious? I can't think of any place with three major hospitals within a mile or less?