So, when you faint, you go to a Pokemon Center. But here's the part I'm confused with. Do you go back to the last one you visited, or the nearest Pokemon Center?
Sorry if this question is kind of silly, and I can't try it out just now.
You always go to the last Pokemon Center that you visited.
Hope this helped!
The last Pokemon Center visited. Source